Cannot log in to the MySQL server with error (HY000/2002) after upgrading to20.04

When I try to log in it says Cannot log in to the MySQL with the error (HY000/2002)enter image description here

After I upgraded my server from 18.04 to 20.04 I can't log in anymore so anyone can help ?

1 Answer

If phpMyAdmin is running on the same server as the database, you'll want to update your config.inc.php file, replacing localhost with 127.0.0.1. The result should look something like this:

$cfg['Servers'][$i]['host'] = '127.0.0.1';

By default, phpMyAdmin will try to connect to the mysql.socket connection when you use localhost. When you use 127.0.0.1 it will make a TCP connection, which should resolve the issue.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like