Skip to content

Problem with php bin/console doctrine:database:create #47057

Answered by caigner
caigner asked this question in Q&A
Discussion options

You must be logged in to vote

After some more tinkering and researching I found the solution:

Instead of

DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7&charset=utf8mb4"

I had to write

DATABASE_URL="mysql://db_user:db_password@localhost:3306/db_name?serverVersion=5.7&charset=utf8mb4"

Now it works. But why this was necessary, I don't understand, because both root@127.0.0.1 and root@localhost are in my mysql user table.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@fd6130
Comment options

@alexislefebvre
Comment options

Answer selected by caigner
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants