Xampp mysql error #2002

4.1k views Asked by At

anyone can help me, how to fix this when i open localhost/phpmyadmin/

it says Error MySQL said: Documentation

#2002 - No connection could be made because the target machine actively refused it.

The server is not responding (or the local server's socket is not correctly configured). 
Connection for controluser as defined in your configuration failed.

when i run mysql_start.bat, it says

Diese Eingabeforderung nicht waehrend des Running beenden
Please dont close Window while MySQL is running
MySQL is trying to start
Please wait  ...
MySQL is starting with mysql\bin\my.ini (console)

MySQL konnte nicht gestartet werden
MySQL could not be started
Press any key to continue . . .

i tried to fix it with solution that provided in google before but it still doesn't work

1

There are 1 answers

0
user668943 On

If you view the file mysql_start.bat it has a generic error that is printed irrespective of the MySQL error.

Try to open a command prompt and type the below command which is available in the mysql_start.bat file.

mysql\bin\mysqld --defaults-file=mysql\my.ini --standalone --console

Running the exact command in the prompt will show you the MySQL error. In my case it was the my.ini was missing and I had to rename one of the sample files and put it to the location.