1

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: https://serverfault.com/questions/299365/cant-login-to-phpmyadmin

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

Still not working

I can log in to MySql via SSH terminal. But I can't with phpMyAdmin login page.

1 Answer 1

1

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';

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .