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

Recommend

Example code for CSS pseudo-classes to modify input selection style

Note: This table is quoted from the W3School tuto...

How to use SessionStorage and LocalStorage in Javascript

Table of contents Preface Introduction to Session...

A very detailed explanation of Linux C++ multi-thread synchronization

Table of contents 1. Mutex 1. Initialization of m...

MySQL 5.7 mysql command line client usage command details

MySQL 5.7 MySQL command line client using command...

Nginx merges request connections and speeds up website access examples

Preface As one of the best web servers in the wor...

How to fix the footer at the bottom of the page (multiple methods)

As a front-end Web engineer, you must have encoun...

Comparison of various ways to measure the performance of JavaScript functions

Table of contents Overview Performance.now Consol...

43 Web Design Mistakes Web Designers Should Watch Out For

This is an article about website usability. The a...

How to count down the date using bash

Need to know how many days there are before an im...

Linux touch command usage examples

Detailed explanation of linux touch command: 1. C...

WeChat applet learning notes: page configuration and routing

I have been studying and reviewing the developmen...

React dva implementation code

Table of contents dva Using dva Implementing DVA ...

Implementation of debugging code through nginx reverse proxy

background Now the company's projects are dev...

Solve the problem of MySql8.0 checking transaction isolation level error

Table of contents MySql8.0 View transaction isola...