I installed MySQL on a Windows operating system by decompressing the compressed package. Encountered some problems, let me share with you through this article the solution to the problem that the MySQL service cannot be stopped and delete under Windows. Friends in need can refer to
I am on the Windows operating system, using decompression Install MySQL in a compressed package. Here's how to install it: click here. When executing the following command:
mysqld --install MySQL --defaults-file=[ini配置文件绝对路径]
When executing the above command, the wrong configuration file path was entered. Although the system may return success . And the command mysqld --initialize can also be executed and generate data files. But when I execute net start mysql, the system keeps prompting that the service is starting. The reason is that the path to my configuration file is wrong, which causes exceptions when the service starts. At this time, the MySQL service cannot be started or stopped through the command line and control panel. The MySQL service cannot be deleted either.
Solution:
Control Panel → Select Large Icon in the upper right view → Administrative Tools → Services → Select MySQL.
At this time you can see that there are no options to stop, restart and pause at all. At this time, you need to do this:
Right-click the MySQL service → Properties → General tab → "Startup type" select disable → Restart the computer → Open the command line as an administrator → cd command to enter MySQL bin folder under the installation path.
Because the MySQL service is set to prohibit startup at boot and the computer is restarted, the MySQL service is stopped at this time status.
Command line input command:
mysqld remove MySQL
The command can be executed normally. After the command is executed, the incorrectly configured MySQL service can be deleted. . Then delete all the files under the MySQL data folder and install MySQL step by step from scratch.
The above is the detailed content of Detailed solution to the problem that the MySQL service cannot be stopped and deleted under Windows. For more information, please follow other related articles on the PHP Chinese website!