To solve this error you have to follow some simple steps which are given below...

1. Check whether the MYSQL is running or not by the following command:

# /etc/init.d/mysqld status
# pidof mysqld
# netstat -plan | grep :3306
If you get below output then your MYSQL is running properly. Here is the output:

# /etc/init.d/mysqld status
mysqld (pid 23832) is running...
#pidof mysqld
23832
# netstat -plan | grep :3306
tcp  0  0 0.0.0.0:3306  0.0.0.0:*  LISTEN  23832/mysqld
This code shows that the MYSQL is working perfectly fine, so you don’t have to worry regarding this. You can also restart the MYSQL services with the below line:

#/etc/init.d/mysqld start
2. If you are still getting the error and not able to login then try to login to command prompt and enter your username and password here. But if don’t remember then you first have to set it in config.inc.php file. Let’s see how to set the PhpMyAdmin password in this file.
  • First check the installation directory of PhpMyAdmin and open config.inc.php file in text editor.
  • Here you have to search for MYSQL username and password field. The code look like below, you just need to enter the MYSQL password to set the login:
$cfg['Servers'][$i]['user'] = 'root'; // enter mysql username here
$cfg['Servers'][$i]['password'] = 'password'; // enter mysql password here
  • Now try to login into PhpMyAdmin.
Was this answer helpful? 0 Users Found This Useful (0 Votes)