phpmyadmin – Can’t Login to phpMyAdmin on CentOS, Google Cloud

centos7google-cloud-platformphpmyadmin

In my MySQL database, I've created two users, one regular user (who has privileges for one database) and one superuser.
When I want to login via any of these accounts to phpMyAdmin I get a "Cannot log in to the MySQL server" error. (I'm accessing remotely)

Inside <Directory /usr/share/phpMyAdmin/> in my /etc/httpd/conf.d/phpMyAdmin.conf file:

<Directory /usr/share/phpMyAdmin/>
    AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
    # Apache 2.4
   <RequireAny>
      Require all granted
      Require ip 127.0.0.1
      Require ip ::1
   </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Allow from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

I've also provided a user and password for my super admin in config.inc.php file. What am I missing? Should I do something about Google firewalls? I haven't configured the firewall rule for MySQL, should I do that now?

EDIT:
I've also tried from this answer: Can't login to phpMyAdmin

$cfg['blowfish_secret'] = 'myPassword'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

Still not working

Best Answer

The answer can be found on the comment of this post: https://www.digitalocean.com/community/questions/cannot-log-in-to-the-mysql-server-without-code-using-phpmyadmin-on-centos7

"Some applications are having trouble with caching _sha2 _password method. Above sets the credentials to use the native one." This may happen to MySQL 8.

Once you login to your database you can try this:

 ALTER USER myUsername IDENTIFIED WITH mysql_native_password BY '123TheBestPassword';
Related Topic