phpMyAdmin is giving #2002 error socket issue

i have recently installed phpmyadmin when i login with root account it give me error #2002 cant login via /var/mysql/mysqld.sock

 

any idea how to patch it

Supporter Asked on March 22, 2016 in Software.
Add Comment
1 Answer(s)
Best answer

If you’re getting the #2002 Cannot log in to the MySQL server error while logging in to phpmyadmin, try editing phpmyadmin/config.inc.php and change:

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

to:

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

 

Note that if you’re on a fresh install, config.inc.php may not exist. You need to rename / copy config.sample.inc.php and then change the relevant line

Supporter Answered on March 22, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.