Support » Installing WordPress » error establishing a database connection when database user has no password

  • Hi,

    On Wampserver 2.5, Apache 2.49, MySQL 5.6.17.

    In PhpMyAdmin, I’ve created a new user ‘test’ and a new database matching the username.

    I’ve granted this user all privileges on the test database.

    I updated wp-config.php with the username ‘test’, database ‘test’, password (copied from PhpMyAdmin), and database host ‘localhost’.

    I have the following in my Windows hosts file localhost, where is my correct local IP address.

    I load the website, and it displays “Error establishing a database connection”.

    I granted the user all global privileges and the error remains.

    I set the user with ‘no password’ in PhpMyAdmin, and updated wp-config.php to remove the password, and the error still occurs.

    Help appreciated.

Viewing 1 replies (of 1 total)
  • Hi there,

    Hope you are well!

    I would like to inform you that when you install WordPress. the password is stored in an encrypted form in the database (PHPMyAdmin). So if you copy it directly from the database, it won’t match with your actual password.

    This can be a reason for getting this error. You can reset your passwod by using the following methods:

    If you are at the initial stage of the site installation, I would suggest you to make a fresh install. Please have a look at:

    I hope this will help you!


Viewing 1 replies (of 1 total)
  • The topic ‘error establishing a database connection when database user has no password’ is closed to new replies.