I'm running a Symfony 5 project on my Ubuntu machine, and when I try to import my database I had created to my project I get the following error:

The thing is I'm going through a tutorial a second time to create my own project, and the first project works just fine. The DATABASE_URL in the .env files on these two project are the same (double and triple checked),
here's the .env

I've tried changing localhost to 127.0.0.1 but the error changes to 'Connection refused', and I also tried adding the real path to the mysql.sock to the php.ini. These are the solutions I've found that apply to my problem, nothing worked so far.
Any ideas would be greatly appreciated!!
Have you defined a path to your socket in the config/packages/doctrine.yaml? See the marked answer here
I think that setting localhost to 127.0.0.1 fixes your initial problem, but then you are getting connection refused as the server isn't accepting your credentials.
If you aren't using a socket, then you need to pass a password in to your DATABASE_URL:
DATABASE_URL=mysql://root:[email protected]:3306/beers?serverVersion=5.7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With