Run the following command in CMD:
Net stop <service name>
Net start <service name>
Note: <service name> the default value is mysql.
That is:
Net stop mysql
Net start mysql
Note:
How to view the service name:
On the desktop, right-click "computer", select "manage", and select "service" and application "->" service ": Find the service name that corresponds to Mysql, in general, it should be the service name of the Mysql Server. For example, Mysql56.
To close and open the service, cmd is generally required to be "opened as an administrator"
In Windows, if you want to configure directory location for mysql's my. ini log-bin and so on, assume that you want to configure the log of log-bin to the mysqllog file of disk D as binlog. The configuration is as follows:
[Mysqld]
Log-bin = "D: \ mysqllog/binlog" NOTE: The last path here uses "/" instead of "\" in the Windows File System