phpMyAdmin is throwing a #2002 cannot log in to the mysql server phpmyadmin

前端 未结 27 2370
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-27 14:50

I have installed MySQL server enterprise 5.1 on my local machine and now I want to install phpMyAdmin, but it does not work.

I have unrared phpMyAdmin to my server r

27条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 14:58

    After trying all of the above suggestions here is what fixed my #2002 error.

    Add the following line to your config.inc.php file and change the number to your MySQL port:

    $cfg['Servers'][$i]['port'] = '3307'; // MySQL port
    

    I had multiple mysql instances installed, and in this case, I had updated my.ini to run MySQL on port 3307, but had not updated phpMyAdmin to reflect the new port. In my case, the line for the port did not exist in the config.inc.php file, so I was not aware that it needed updating.

提交回复
热议问题