Windows system MySQL add to the system service method (MySQL decompression version) _mysql

Source: Internet
Author: User

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.