I am new to Symfony and started doing some tutorials in order to get some things done. I am working on a Linux Mint 18 machine and a standard Symfony3-project.
I\'d
Symphony mysql connection
Start your mamp, xamp or other alternative for my sql
go to http://localhost:8888/phpMyAdmin/ and get these informations, bd_name : can be root bd_pass : can be root or nothing host : can be localhost port : attention the default port in the URL is 8888 but it's not the port that you should use in your .env file, check at the top of your admin phpmyAdmin page for Server:localhost:the_port_is_here. So it can be 8889
write your Server version it can be 5.7.26
Go back to your .env file on your symphony project and change the line DATABASE_URL= ex : DATABASE_URL="mysql://root:root@127.0.0.1:8889/mybddname?serverVersion=5.7"
Open the integrated terminal of your project and write if it the first time
php bin/console doctrine:database:create
if you wan to drop the data base
php bin/console doctrine:database:drop --force
PS : I'm using nmap on Mac OS for symphony project
Had the same error.
OS: macOS High Sierra. MAMP 5.0.1
The problem was that the default MySQL port on MAMP was 8889 and in parameters.yml it was 3306