sequence
For the detailed installation process of Mysql, please refer here
When starting the MySQL service, I encountered an error message that it could not be started. Finally, I found that it was mysqld --initialize-insecure
a problem when entering the command for initialization. The data directory was initialized incorrectly.
Hereby record the solution
Problem Description
Console input command net start mysql
Console output information:
The MySQL service is starting. The MySQL service cannot be started. The service reported no errors. Please type NET HELPMSG 3534 for more help.
solution
WIN
+ R
Enter cmd
to open the command line
Switch to the Mysql installation directory
Enter bin
the directory and execute the following commands in sequence
# 注册服务
mysqld -install
# 初始化 Mysql
mysqld --initialize-insecure
# 启动服务
net start mysql
If an error is reported and access is denied , it means insufficient permissions.
We can open it as an administrator
It can be used as a little trick in the future. Generally, for similar problems in Windows cmd, first consider whether the permissions are insufficient, open it as an administrator, and then think about other errors.
After opening as an administrator , the console displays
The problem is solved and the service starts normally.