Home >Database >Mysql Tutorial >What should I do if the mysql service cannot be started?
Solution: 1. In the cmd window, enter the path of the MySQL installation directory bin and execute the command "netstat -ano" to find the PID value of the 3306 interface; 2. Open the task manager and find the corresponding PID MySQL process, right-click to close; 3. In the cmd window, re-enter the command "net start mysql", and the service will be started successfully.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
When opening cmd as an administrator and trying to start MySQL, the following situation occurs:
An effective solution tested by myself:
1 .Enter the path of the MySQL installation directory bin, enter the command netstat -ano, and find the PID value of the 3306 interface.
#2. Open the task manager, find the mysql process corresponding to the PID, right-click to close it, and the shutdown is complete as shown below. (Click PID to sort PID values for easy search)
3. Re-enter the command net start mysql, and the service will start successfully.
This method can solve similar port occupation problems. For example, when the welcome interface cannot be opened after Tomcat is started, this method can also be used to close the PID corresponding to the 8080 port. process.
[Related recommendations: mysql video tutorial]
The above is the detailed content of What should I do if the mysql service cannot be started?. For more information, please follow other related articles on the PHP Chinese website!