Wednesday 20 February 2019

How to solve Xampp MySQL Error # 2002 - No connection could be made because the target machine actively refused it

1. Go to the data folder of MySQL

To solve this problem, you need to locate the mysql folder in your xampp installation. This is usually just one version, so you may find it (with a default installation path) in C:\xampp\mysql\data. This folder contains mainly logs and all the databases on MySQL.

2. Backup Log files and delete them

Create a copy of the log files of mysql, namely the files ib_logfile0 and ib_logfile1. These files are log files created during the runtime for InnoDB. Normally, removing them will solve your issue as they will be created later, however create a security copy of those files somewhere else, so in case that it doesn't work, you can still restore them and leaving xampp as it was from the beginning.
Once you have a copy of those files somewhere else (other directory), delete them from the original directory and proceed with the next step.

3. Restart MySQL and Apache

As final step restart the MySQL and Apache services in case they are running with the xampp control panel. After restarting those services, try to access again PHPMyAdmin at the URL http://localhost/phpmyadmin and you should be able to use PHPMyAdmin again.

No comments:

Post a Comment