Connection Failed: 1130 PHP MySQL Error

#1130 - Host 'localhost' is not allowed to connect to this 
MySQL server Connection for "root" as defined in your configuration 
failed. phpMyAdmin tried to connect to the MySQL server, and the
 server rejected the connection.

Check the host, username and password in your configuration and make 
sure that they correspond to the information given by the administrator
 of the MySQL server.

While trying to access a Web URL (hosted locally on IP 192.168.2.24) I received the above MySQL Error.

Solution :

Just changing the domain IP : 192.168.2.24 to localhost resolved the issue.

If you want to access the page using the IP address you need to make changes to the config.inc.php file under the PhpMyAdmin directory.


FAQ :

Q: What should I do if I get the #1130 error when trying to connect to MySQL? A: Check your MySQL server configuration to ensure it allows connections from the specified host. Verify the host, username, and password in your configuration.

Q: How can I resolve the #1130 error when accessing a web URL hosted locally? A: Try changing the domain IP to localhost. If you need to use the IP address, update the config.inc.php file under the PhpMyAdmin directory.

Q: What if changing the IP to localhost doesn't work? A: Ensure that the MySQL server is configured to accept connections from localhost and that there are no firewall rules blocking the connection.

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!