Search code examples
phpmysqlsymfonyphpmyadminispconfig

An exception occured in driver: SQLSTATE[28000] [1045] Access denied for user 'c1ser****'@'localhost' (using password: YES)


Actually I work why database (phpmyadmin) on my symfony's project, but when I try to use them, I've got this error :

An exception occured in driver: SQLSTATE[28000] [1045] Access denied for user 'c1ser****'@'localhost' (using password: YES)

The user and passwoard was defined on ISPConfig, and I have any difference with me parameters's file !

My parametres.yml :

parameters:
database_driver: pdo_mysql
database_host: localhost
database_port: null
database_name: c1test
database_user: c1ser****
database_password: "******"
database_encodage: UTF8

and my config.yml:

doctrine:
dbal:
    default_connection: default # précise la connexion utilisée par défaut
    connections:
        default:
            driver:   "%database_driver%"
            host:     "%database_host%"
            port:     "%database_port%"
            dbname:   "%database_name%"
            user:     "%database_user%"
            password: "%database_password%"
            charset:  "%database_encodage%"

Thanks !


Solution

  • OK I find the solution -> ipserveur/phpmyadmin -> Users -> change localhost by "%", and change the password and it's ok.