xampp phpmyadmin access denied error(#2002)

孤街醉人 提交于 2019-11-29 18:48:55

问题


Hi everyone i had mysql server running on 3306. I uninstalled that completely and installed XAMPP. Mysql was not running at the beginning, then I changed the port to 3307 in my.ini as well as configuration of CP. It is showing status as running now but phpmyadmin is giving error as access denied. I tried so many solutions but didnt help. Someone please help me. Thanks in advance.


回答1:


Try this.

Go to the directory where Xampp is installed. Lets call it xampp. Now open the file xampp/phpMyAdmin/config.inc.php in any text editor.

Now find this line

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

and change it to

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

Note: If you are on Windows, xampp is by default installed in C:\xampp




回答2:


I faced the same issue as well. Quite irritating though, wasted a hell lot of time of figuring this out. My problem was I noticed that when my XAMPP started the port number seen on the XAMPP control panel for MySQL was 3307, but in the MySQL configuration files it was 3306!!. There was no use of making changes in configuration files, re-installing!.. So, all I did was opened the Windows Task manager found the mysql process running, ended the process and restarted the MySQL from XAMPP control panel and finally it worked!! Seems like some other application was listening on port number 3307 for me and got conflicted. :P




回答3:


For me on windows 10 this issue was solved after changing

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

to:

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

in xampp/phpMyAdmin/config.inc.php




回答4:


I had faced thia problem too. Its easy to tackel this just go to taskmanager and then click on services (on the extreme right in the navigation bar of task manager) find where is mysql running with a PID and right click on it and stop it. When it shows stopped then goto your xampp control and start the mysql service. It worked for me hope it'll do so with you.



来源:https://stackoverflow.com/questions/22971248/xampp-phpmyadmin-access-denied-error2002

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!