Hoping someone could point me in the right direction, I am trying to move our MySQL database to a new host, I exported data and imported on the new server.
I edited the config.php file to point to the new database I get an error:
SQLSTATE[HY000] [2002]
When I check the MySQL logs it is indicating that the login is being denied:
Access denied for user ” (using password: NO)
To me Expression Engine is not passing the password when it is trying to connect to the new database, but I must be missing something.
Welcome to the forums!
I would first double check the credentials in your config.php:
Is the hostname correct? (usually “localhost” but your host may need another name)
Are the username and password correct? It’s easy to make a typo. If in doubt try resetting the MySQL password and updating config.php
Check to see if the DB user has permissions to access the database.
Hi Rob,
Thanks for the response, I have managed to fix this, for anyone else who has this obscure error, I was moving to Azure MySQL Flexible server, you also need to edit system\ee\legacy\database\drivers\mysqli\mysqli_connection.php file. There is a line that references to a certificate, in the Azure portal you will need to download the latest Digicert Global Root Cert and repoint it in the mysqli_connection file.
Videsh
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.