If MySQL was installed before XAMPP was installed and added to the Windows service
Two MySQL conflicts in Windows services when using XAMPP
This means that you have used MySQL on your computer before, and the path and port are occupied.
In this case, MySQL in XAMPP will not start normally,
A message like this will appear
First, try to change the port value in config of Xampp Mysql and control Panel settings, still error
Now try the second method of prompting the message (if you don't want to use it before)
General idea:
CMD Open command line
sc query MySQL queries mysql service status
sc delete mysql delete mysql service
sc query MySQL query again, the following message appears to indicate that the deletion was successful
Output:
[SC] Enumqueryservicesstatus:openservice Failure 1060:
The specified service is not installed
Start XAMPP again to use
It uses the SC tool that comes with Windows
Note that the command is to be used under Administrator privileges
Simply run cmd as administrator to,cmd-> right-click and run as Administrator
XAMPP solution for using MySQL port in a problem