net start mysql service name is invalid after mysql After configuring the environment variables

In the DOS window, the interface gitbush and some command-line tools you can use, type: net stop mysql, when net start mysql, always prompt: Invalid service name.

When prompted as follows:

 

The reason is: because the net start + service name, start the service is registered with the win. At this point, the system is not registered to the mysql service. That is the current path is not mysql service.

How to register to win MySQL service inside? ! ! ! (Proceed as follows)

1. installation path to the MySQL bin

2. Enter mysqld --install command line

Success: Service successfully install appear on your behalf has been successfully installed,

 

unsuccessful:

 

If the time appears above the text, you need administrator, run DOS window, so that you can succeed

3. Perform the net start mysql appears:

 

mysql data files to delete, re-execute mysqld --initialize can generate data files in the current folder path, and then run net start mysql can start mysql

Quick open DOS as an administrator: Open a DOS command window with administrator: in the current folder bin under, first hold down the Shift + Right-click Run as administrator Dos window you can

Guess you like

Origin www.cnblogs.com/dianzan/p/12363627.html