pyrocms / pyrocms

Pyro is an experienced and powerful Laravel PHP CMS.

Home Page:https://www.pyrocms.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Access denied for user 'forge'@'localhost'

egyleader opened this issue · comments

Describe the bug
when installing pyro cms with mysql database I get the following error message

In Connection.php line 678
 SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO) 
(SQL: select * from information_schema.tables where table_schema = forge and table_name = pyr_migrations and
table_type = 'BASE TABLE') 

In Exception.php line 18
 SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)        

In PDOConnection.php line 38

 SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)                                                                  

I am using Windows 10 with Laragon for mysql and apache management

To Reproduce
Steps to reproduce the behavior:

  1. require pyrocms with composer composer create-project pyrocms/pyrocms
  2. execute command php artisan install
  3. fill the data with your localhost database data

Expected behavior
to install the pyrocms in the provided database details without errors

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser : Brave (Chromium based )
  • Version: Brave | 1.19.92 Chromium: 88.0.4324.152 (Official Build) (64-bit)

Additional context
I provided the following info for the db

host : localhost
username: root
password:

Do you have a forge user? Make sure you look at your database credentials within the .env file and make sure they match up to the users/credentials for your database.

Do you have a forge user? Make sure you look at your database credentials within the .env file and make sure they match up to the users/credentials for your database.

I don't have a forge user and the crediential are the default for laragon root withh no pass

@egyleader I also ran into this issue when trying to install locally. Running the installer a second time was successful. This leads me to believe that the env variables for the database aren't being set prior to the attempt to run migrations as 'forge' is the default set for "DB_DATABASE" and "DB_USERNAME" in the database config ( ./config/database.php ).

Is a permission problem when pyro creates the .env file. Change permissions and run again the installations, solve this problem for my. But i have another problem with migrations and MariaDB...

I see this is closed but I just experienced a very similar error when installing.

In Connection.php line 678:
                                                                                                                                                                                                    
  SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge' (SQL: select * from information_schema.tables where table_schema = forge and table_name = default_migrations an  
  d table_type = 'BASE TABLE')                                                                                                                                                                      
                                                                                                                                                                                                    

In Exception.php line 18:
                                                                                    
  SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge'  
                                                                                    

In PDOConnection.php line 38:
                                                                                    
  SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge'  
                                                                                    

I specified the following:

host: localhost
user: benjamin
pass: [not forge]
db: pyro.local

I don't have anything in my environment or on my machine pertaining to "forge".