Uncategorized

[How To] 1045 Cannot log in to the MySQL server phpMyAdmin

The phpMyAdmin might display following error when trying to login:

1045 Cannot log in to the MySQL server

Solution:

1) Check if MySQL service is running or not.

2) Try to login in the MySQL command prompt using the MySQL username and password. If no MySQL root password is set then set the password first.

If the above two steps work fine then:

3) Go to phpMyAdmin installation directory and open config.inc.php file in editor

4) Locate the MySQL username, password field and insert your current MySQL password.

$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'password'; //mysql password here

5) Check by logging in phpMyAdmin.

Related Articles

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button