Can't set up the application
Closed this issue · 1 comments
dnyamy commented
Hello,
I am trying to setup the application on my Ubuntu 20.04 server.
I followed install instructions. But got this error on migrate command.
{"message":"Command \"'doctrine:migration:migrate'\" exited with code \"1045\"","context":{"command":"'doctrine:migration:migrate'","code":1045},"level":100,"level_name":"DEBUG","channel":"console","datetime":"2022-12-01T22:21:54.482699+00:00","extra":{}}
In ExceptionConverter.php line 101:
An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'fewohbee'@'localhost' (using password: YES)
In Exception.php line 28:
SQLSTATE[HY000] [1045] Access denied for user 'fewohbee'@'localhost' (using password: YES)
In Driver.php line 28:
SQLSTATE[HY000] [1045] Access denied for user 'fewohbee'@'localhost' (using password: YES
So I manually created fewohbee user in DB and granted it all privileges on fewohbee DB.
And now I am getting another error.
{"message":"Command \"'doctrine:migration:migrate'\" exited with code \"2002\"","context":{"command":"'doctrine:migration:migrate'","code":2002},"level":100,"level_name":"DEBUG","channel":"console","datetime":"2022-12-02T09:16:09.248623+00:00","extra":{}}
In ExceptionConverter.php line 101:
An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for fewohbee failed: Temporary failure
in name resolution
In Exception.php line 28:
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for fewohbee failed: Temporary failure in name resolution
In Driver.php line 28:
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for fewohbee failed: Temporary failure in name resolution
In Driver.php line 28:
PDO::__construct(): php_network_getaddresses: getaddrinfo for fewohbee failed: Temporary failure in name resolution
Any idea on the cause ?
Thanks and regards
Dr
developeregrem commented
Seems like a configuration issue. Please check the settings for your database connection string in .env
file.
Example String: DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
Maybe you added "fewohbee" as host name for the database but if you run DB and fewohbee on the same host than you probably need to use 127.0.0.1 or localhost.