Mysql command line startup displays "Invalid service name"

1. The command line window must be opened as an administrator, otherwise an error may be reported

2. Execute net start mysql under cmd, and it will prompt that the service name is invalid. This is because net start + service name starts the service registered under win. At this time, mysql is not registered in the service in the system. Next, register MySQL into the win service.

 

3. cd to switch to the MySQL installation directory, enter mysqld --install and press Enter. It will prompt Service successfully install to indicate successful installation.

 

4. Execute net start mysql again
 

Guess you like

Origin blog.csdn.net/hjy_mysql/article/details/131892154