简体   繁体   中英

Symfony4/doctrine migration issue

I'm having an issue trying to do a migration using the command line: php bin/console doctrine:migrations:migrate First of all: - I'm using symfony 4 in a group project on github - I'm using a mac and MAMP while other peeps from my group are using PCs and xampp

I'm pretty new to symfony 4 and github so I wouldn't be surprised if the solution was obvious. So I cloned the project and used the php bin/console doctrine:database:create command line to have my database up and running. However, I got an error message and after searching quite a bit, can't understand where the issue comes from:

MacBook-Pro-de-Jeremy:globetriber jeremystephens$ php bin/console doctrine:database:create 2018-02-18T17:18:58+01:00 [error] Error thrown while running command "doctrine:database:create". Message: "An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused"

In AbstractMySQLDriver.php line 108: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused

In PDOConnection.php line 47: SQLSTATE[HY000] [2002] Connection refused

In PDOConnection.php line 43: SQLSTATE[HY000] [2002] Connection refused

Let me know if you need any other information, thanks in advance for the help!

perhaps you must make sure the configuration of databasa is right documentation

in your .env file :

customize this line!

DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM