Mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)

Keywords: WordPress Multisite - Google Cloud Platform - Technical issue - Credentials
Got this error while trying to login phpMyAdmin, checked a lot of guides…

  1. Got the bitnami-base-password, but same error.
  2. Got the same pw as bitnami-base-password, of course same error.
  3. What is the default phpMyAdmin password? Used the suggested username and pw…root / bitnami, but same error.

Tried both 80 & 443 in PuTTY SSH Tunnels Destination port, both got me to the phpMyAdmin login page successfully, but same error.

Any suggestion where should I look into…

Hi @samuel1,

Could you try this guide:

Please let me know if you find any issues.

Please, click on :heart: if you think my answer was helpful

Hi @michiel

I did already, as I mentioned the first guide…access-phpmyadmin Got the bitnami-base-password, but same error.


Hello @samuel1,

First, let’s check if MySQL is running. For that, access your instance via SSH and execute:

sudo /opt/bitnami/ status mysql

If it is stopped, start it:

sudo /opt/bitnami/ start mysql

Then, we should check if you are able to access mysql via command line. For that, execute this command:

sudo /opt/bitnami/mysql/bin/mysql -uroot -pPASSWORD

where PASSWORD needs to be changed with your MySQL root password.

Please confirm if the steps below worked properly for you.

Hi David,

It returned the same ERROR 1045 (28000): Access denied for user
(using password: YES) after executing the command.

Does that means the pw I copied from bitnami-base-password under VM
instance details is wrong? where can I find the correct pw or change one?


Hello @samuel1,

This guide explains how to reset your MySQL root password:

I hope it helps

Hi @davidg

According to the guide, I should Create a file in /home/bitnami/mysql-init
to reset the password, but there is no such a folder “mysql-init”, only a
file “bitnami_credentials” with the same password as bitnami-base-password.

Should I create the folder “mysql-init” or it might be something suspicious?


Hi @samuel1,

That sentence is a bit confusing. It means to create a file called mysql-init in /home/bitnami. Also, this approach does not work with MySQL 8 (we will update our documentation). In this case, you should use the following commands:

   echo "ALTER USER 'root'@'localhost' IDENTIFIED BY 'NEW_PASSWORD';" > /home/bitnami/mysql-init
   sudo /opt/bitnami/ stop mysql
   sudo /opt/bitnami/mysql/bin/mysqld_safe --pid-file=/opt/bitnami/mysql/data/ --datadir=/opt/bitnami/mysql/data --init-file=/home/bitnami/mysql-init --lower_case_table_names=1 2> /dev/null &
   sudo /opt/bitnami/ restart mysql
   rm /home/bitnami/mysql-init


Hi @davidg
Got it working
Thanks very much

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.