MySQL software version: 64-bit 5.7.12
1, first configure MySQL environment variables, at the beginning of the system environment variable path to add MySQL Bin directory path to ";" At the end, my path is configured as follows:
2, modify the MySQL root directory of the contents of the My-default.ini file, mainly modify 2 properties: Basedir and DataDir.
The root directory of the Basedir:mysql;
DataDir: directory where database data is saved (directories need to be created manually);
A few things to note:
The backslash of the directory is best with a backslash, or you need to escape or add double quotes;
The DataDir directory must be created beforehand.
3, use the system administrator to start cmd (Command Prompt), and into the MySQL bin directory (even if configured path also need to perform this step!) ), as shown below:
4, install the MySQL service, enter the command: Mysqld-install, and then enter; The following prompts indicate that the installation was successful:
The-install command can also specify the address of the configuration file, as follows: Mysqld-install MySQL--defaults-file= "D:\software\mysql5.7.12\my-default.ini"
5, initialization MySQL service, input instructions: mysqld--initialize
It is recommended that you clear the DataDir directory before you execute this directive, or else you may receive an error that failed to initialize.
For example: System prompts 3534 error
6, start the MySQL service, input command: net start MySQL, the success of the following map:
Some of the other common directives:
1, stop the MySQL service, input command: net stop MySQL
2, the removal of MySQL services, input instructions: mysqld-remove
The above is a small series to introduce the Windows system MySQL added to the System services method (MySQL decompression version), hope to help everyone, if you still have questions welcome to my message, small series will promptly reply to everyone, here also thank you for the cloud Habitat Community website support, Believe that we will do better!