Question

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.

enter image description here

enter image description here

Was it helpful?

Solution

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

OTHER TIPS

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

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.

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

If it is not working after changing host settings. I would recommend for others to change the permissions of xampp folder

  1. right click and select "give access to"
  2. select security tab
  3. click on the edit, new popup will be opened
  4. click on the allow check boxes and apply.

thats it. enter image description here

Open App Xampp config mysql.ini add script skip-grant-tables right below [mysqld], and then Save.

Config > Service and Port Settings > MySQL. change to 3306

Open App Xampp config config.inc.php change script

$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;

become

$cfg[‘Servers’][$i][‘host’] = ‘localhost:3306’;

and then Save.

Try Turning off everything, Close App and Reopen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top