问题
I have an issue with XAMPP 1.7.4. So far it has been doing great on windows 7 and 8, but when I tried installing it on windows xp service pack 3, it gave me a MySQL error #2002.
The BIG issue was that in the status page the MYSQL Database was noted as DEACTIVATED as seen in the screenshot below:

Meanwhile, in the XAMPP control panel application, MySQL is actually running well, even in the services tab, so what could be the problem with this set up???


回答1:
My problem : MySql Status appears as deactivated.
- Ensure your my.ini file points to the correct MySql port (typically 3306)
- Use localhost:(Apache port number)/phpmyadmin to access the mysql user : pma : This user needs no password.
The second bullet is how I resolved my problem.
回答2:
i came up with an ideal solution, the xampp folder in C: was corrupted after the OS crashed, therefore there were missing files which led to re-installation of xampp but since the registry was not cleared, the application could not take control of the apache & mysql ports, i used a registry cleaner and re-installed xampp again and this time it worked from the inset. Thanks for all the comments.
回答3:
As cptnk said, look at your poccesses list – there may be mysqld (MariaDB for ex.) service started by other stack. So if it is launched not from your xampp stack – then stop it and run stack not from xampp-control, but with apache_start.bat and mysql_start.bat or with xampp_start.exe.
来源:https://stackoverflow.com/questions/18469111/why-is-mysql-database-deactivated-on-xampp-status-but-green-on-the-xampp-control