MySQL cannot start the universal solution under Windows

MySQL startup error

Before MySQL is installed on window10, it is executed by executing net start mysql to
start, and executing net stop mysql to shut down.
One day it started to start and reported the error "MySQL service could not be started", "Please type NET HELPMSG 3523 for more help".
MySQL cannot start the universal solution under Windows
If you execute the start command again, it will report "The service is starting or stopping, please wait a while and try again".

solution

This kind of problem is online

  • Modify the configuration file my.ini
  • Delete files in the data directory
  • Reinstall MySQL

And many other solutions.
The first two solutions failed to solve my problem.
As for reinstalling MySQL, as far as I know, there will be many pitfalls when installing MySQL for the second time on a Windows computer that has already installed MySQL. If you don't want to toss, here is a quick way, you can try it.

The simplest solution

mysqld --console command

There are two ways to start MySQL under window:

  1. Open cmd with administrator privileges and execute net start mysql.
  2. Open cmd with administrator privileges, enter the MySQL installation directory bin, and execute mysqld --console.

The first startup method is not successful, you can try the second method according to the following steps.

The first step is to kill MySQL residual process

Before starting the second method, kill the mysqld process. carried out

tasklist| findstr "mysql"  

Check whether there is a mysqld process.
MySQL cannot start the universal solution under Windows
If there is a mysqld process, execute

taskkill/f /t /im mysqld.exe  

Kill process
MySQL cannot start the universal solution under Windows

The second step is to start MySQL

Go to the MySQL installation directory bin and execute

mysqld --console

MySQL cannot start the universal solution under Windows

Guess you like

Origin blog.51cto.com/14947900/2561577