In order to setup symfony to connect to mySQL database we need to run from the command this
symfony configure:database 'mysql:host=localhost;port=8889;dbname=test' root root
test is database name as created for my symfony project using the phpMyAdmin on the MAMP page. By default the port for MySQL is 8889, you can verify it on the MAMP start page. Same with the username and the password, which in this example is root both for username and password.