0

I set up my Vagrant Box and run it. Everything is fine, i can access via SSH and from ssh to my MySQL DB with User: admin Passwort: 123

Now i want to set up my dbal connection in symfony with same parameters. But when i try to generate entity with the console - i get an access denied error.

here are the configs

vagrant config.yaml

mysql:
install: '1'
settings:
    version: '5.6'
    root_password: '123'
    override_options: {  }
adminer: 0
users:
    mysqlnu_frgjl84yupmt:
        name: admin
        password: '123'
databases:
    mysqlnd_u4je0vjf3q4p:
        name: symfony
        sql: ''
grants:
    mysqlng_vbmahcu6w4us:
        user: admin
        table: '*.*'
        privileges:
            - ALL

symfony parameters.yml

parameters:
    database_host: 127.0.0.1
    database_port: ~
    database_name: symfony
    database_user: admin
    database_password: 123

I also tried

parameters:
    database_host: 127.0.0.1
    database_port: ~
    database_name: symfony
    database_user: admin
    database_password: '123'

parameters:
    database_host: localhost
    database_port: ~
    database_name: symfony
    database_user: admin
    database_password: 123

parameters:
    database_host: localhost
    database_port: ~
    database_name: symfony
    database_user: admin
    database_password: '123'

I hope you can help me fix this problem :(

Thanks a lot

Brendan
  • 908
  • 2
  • 15
  • 30
cRsakaWolf
  • 85
  • 1
  • 14

1 Answers1

0

That's because you have user admin@127.0.0.1 which means something like:

a user with login admin that may login from host 127.0.0.1

To log into MySQL form outside (from another host actually, because 127.0.0.1 is localhost) you need to create user that will allow you to do that.

Jakub Matczak
  • 15,341
  • 5
  • 46
  • 64