docker-symfony
docker-symfony copied to clipboard
Mysql remote connections
Hi,
When I fill in the following at step 4.iii:
$ sf3 doctrine:database:create
I get this error:
[Doctrine\DBAL\Exception\DriverException]
An exception occured in driver: SQLSTATE[HY000] [1130] Host 'dockersymfony_php_1.dockersymfony_default' is not allowed to connect to this MySQL server
I think it happened because remote connections in mysql is disabled?
Here is my parameters.yml
# This file is auto-generated during the composer install
parameters:
database_host: mysqldb
database_port: null
database_name: symfony
database_user: root
database_password: root
Thanks.
Sorry, I've no idea :( I just try with the latest Symfony edition (3.1) and everything works fine !
Try to remove your .data folder and rebuild your container
Most of the time the root user is a management user only, and is only allowed to connect from localhost.
Make sure you are using the right database_host. This has to be the same as the database container name.
We can make remote connection directly on "db" container IP:
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockersymfony_db_1