How to fix phpMyAdmin access Denied error in XAMPP

How to fix phpMyAdmin access Denied error in XAMPP

When you run XAMPP server in your localhost and when you are trying to access phpMyAdmin you will see an error cant connect invalid settings in phpMyAdmin access denied error in XAMPP localhost and you can resolve access denied error in MySQL easily by following few simple steps and changing few settings in XAMPP files, so let’s see in detail how to fix how to fix phpMyAdmin access denied error.

When will I get phpMyAdmin access denied error in XAMPP?

If you are trying to access phpMyAdmin then only you will get this error and your XAMPP front end will act normally until you fix this error.

xampp-phpmyadmin-access-denied-xampp

How to fix phpMyAdmin access denied error:

Change config.inc host in phpMyAdmin to fix phpMyAdmin access denied error

In config.inc file you need to replace ip address and localhost along with your XAMPP mysql port number in cfg host.

Step 1: Navigate to XAMPP installation folder on your c drive

Advertisement

Step 2: XAMPP folder -> PhpMyAdmin->config.inc file

Step 3: Right click on config.inc and open with notepad editor.

Step 4: on line no 26 in config server settings “Bind to the localhost ipv4 address and tcp” comment section, change server settings of host IP.

Step 5: Remove 127.01.23 from -> $cfg[‘Servers’] [$i] [‘host’] = ‘127.01.23’;             

Step 6: Replace 127.01.23 to localhost:mysqlportnumber -> $cfg[‘Servers’] [$i] [host] = ‘localhsot:3307’;

Step 7: Once you make changes, go ahead and save config.inc file and restart XAMPP server.

That’s it, once you restart XAMPP server you will be able to access phpMyAdmin without any issue like phpMyAdmin access denied error in XAMPP anymore.

Change my.ini file to fix phpMyAdmin access denied error

Step 1:  Navigate to XAMPP installation folder.

Step 2: In my case it is c drive->XAMPP folder.

Step 3: Open mysql folder.

Step 4: now, open bin folder.

Step 5: Now, right click on my.ini file and open with notepad++ editor or any editor.

Note:: You can also open with normal notepad as well, doesn’t matter which editor you are using.

Step 6: In my.ini file ->Scroll down and find [mysqlid] and below that you need to add skip-grant-tables.

INFO/NOTE: skip-grant-tables should be exact same without caps and without spaces and with hyphens.

Step 7: Once you update skip-grant-tables, go ahead and save my.ini file and  close my.ini file.

Step 8: Now go ahead and restart XAMPP control panel.

That’s it, once you restart XAMPP control panel, start the Apache server and MySQL and now you will be able to access phpMyAdmin without any issues.

More Related Coverage on XAMPP Errors

1) How to fix Apache Shutdown unexpectedly in Xampp?

2) How to Uninstall or Remove and Reinstall XAMPP in windows 10

3) Mysql Not Starting in Xampp Error on Port 3306

How to check port number of MySQL in XAMPP?

Open control panel settings and side to MySQL start button you can see port number of mysql.   

Will XAMPP server control panel will start if I get phpMyAdmin access denied error?

Yes ! XAMPP server control panel will start without any issue and will show and get connected to bot Apache and MySQL with their respective ports and wit will show connected.

Why PhpMyAdmin Access Denied error in XAMPP localhost?

This is due to phpMyAdmin tried to connect to the MySQL  server and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information provided by the administrator of the MySQL server.

Can I Able to Access front end if I get phpMyAdmin access denied error?

Yes! You can access front end but when you visit phpMyAdmin it will not connect because XAMPP is unable to connect to backend and mysqli_real_connect_error due to invalid settings or misconfiguration.

Why I am getting phpMyAdmin access denied error in XAMPP?

This is due to MySQL settings mis-configuration and due to port miss match, XAMPP server is unable to connect to MySQL due to port unavailability and hence access is denied.

How to fix phpMyAdmin access denied error in XAMPP?

In phpMyAdmin config.inc settings, you need to change config settings and replace the mysqli server host ip address to localhost:mysqlportnumber, like this -> $cfg[‘Servers’] [$i] [‘host’] = ‘localhsot:3307’;.

Where is phpMyAdmin config.inc file located in XAMPP?

Navigate to XAMPP installation folder -> XAMPP->phpMyAdmin->config.inc and you can also navigate this config.inc file from control panel as well.

What is my MySQL post number?

By default MySQL port number is 3306.

How to check MySQL port number in XAMPP?

Open control panel ->side by start button you will see MySQL port number and you can also check MySQL port number by opening config settings from XAMPP control panel as well.