Solution to the problem that MySQL service cannot be stopped or deleted under Windows

Solution to the problem that MySQL service cannot be stopped or deleted under Windows

I installed MySQL on Windows by unzipping the compressed package. Here is how to install it: Click here. When executing the following command:

mysqld --install MySQL --defaults-file=[absolute path to the ini configuration file]

When executing the above command, an incorrect 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 will always prompt that the service is starting. The reason is that my configuration file path is wrong, which causes abnormalities when the service is started. At this time, the MySQL service cannot be started and cannot be stopped through the command line and control panel. The MySQL service also cannot be deleted.

Solution:

Control Panel → Select Large Icons in the upper right corner → Administrative Tools → Services → Select MySQL.

At this time you can see that there is no option to stop, restart or pause. This is what you need to do:

Right-click the MySQL service → Properties → General tab → Select Disable in "Startup type" → Restart the computer → Open the command line as an administrator → Use the cd command to enter the bin folder under the MySQL 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.

Enter the command on the command line:

mysqld remove MySQL

The command can be executed normally, and after the command is executed, the incorrectly configured MySQL service can be deleted. Then delete all the files under the MySQL data folder and reinstall MySQL step by step from scratch.

The above is the solution to the problem that the MySQL service cannot be stopped and deleted under Windows introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • How to completely delete the MySQL 8.0 service under Linux
  • How to completely delete the MySQL service (clean the registry)
  • Tips for deleting mysql service with sc
  • Specific method to delete mysql service

<<:  JavaScript implements click toggle function

>>:  Linux uses NetworkManager to randomly generate your MAC address

Blog    

Recommend

Special commands in MySql database query

First: Installation of MySQL Download the MySQL s...

XHTML: Frame structure tag

Frame structure tag <frameset></frameset...

An article to master MySQL index query optimization skills

Preface This article summarizes some common MySQL...

How to upload projects to Code Cloud in Linux system

Create a new project test1 on Code Cloud Enter th...

HTTP return code list (Chinese and English explanation)

http return code list (below is an overview) for ...

Several situations where div is covered by iframe and their solutions

Similar structures: Copy code The code is as foll...

Apache ab concurrent load stress test implementation method

ab command principle Apache's ab command simu...

jQuery simulates picker to achieve sliding selection effect

This article shares the specific code of jQuery t...

Why do code standards require SQL statements not to have too many joins?

Free points Interviewer : Have you ever used Linu...

Introducing icons by implementing custom components based on Vue

Preface In project development, there are many wa...

Detailed examples of converting rows to columns and columns to rows in MySQL

mysql row to column, column to row The sentence i...

Comprehensive understanding of Node event loop

Table of contents Node Event Loop Event loop diag...

JS realizes special effects of web page navigation bar

This article shares with you a practical web navi...