MySQL Add to System service method under Windows system (MySQL decompression version)

Source: Internet
Author: User
Tags mysql in

MySQL software version: 64-bit 5.7.12

1. First configure the MySQL environment variable, add the path of the MySQL bin directory at the beginning of the system environment variable path to ";" At the end, my path is configured as follows:

2. Modify the contents of the My-default.ini file under the MySQL root directory, and change the main 2 properties: Basedir and DataDir.

The root directory of the Basedir:mysql;

DataDir: Save directory for database data (directories need to be created manually);

A few things to note:

The slash in the TOC is best used with backslashes, or it needs to be escaped or double-quoted;

DataDir directories must be created in advance.

3. Use the system administrator to start cmd (Command prompt), and go to the MySQL bin directory (even if the path is configured to do this step!) ), such as:

  

4, install the MySQL service, enter the command: Mysqld-install, and then enter; The following prompt indicates 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. Initialize the MySQL service, enter the command: Mysqld--initialize

It is recommended that you clear the DataDir directory before executing this command, or you may get an error with initialization failure.

Example: System prompt 3534 Error

6. Start MySQL service, enter command: net start MySQL, start successfully such as:

Some other commonly used directives are:

1. Stop the MySQL service, enter the command: net stop MySQL

2. Remove MySQL service, enter command: Mysqld-remove

The above is a small part of the introduction of the Windows System MySQL added to the system service method (MySQL decompression version), I hope to help everyone, if you have questions welcome to my message, small series will be in time to reply to everyone, in this also very thank you to the script home site support, Believe that we will do a better job!

Articles you may be interested in:
    • Windows7 install MySQL 5.6 uncompressed version
    • How to install and uninstall MySQL service under Windows (MySQL 5.6 Zip decompression installation tutorial)
    • Mysql5.7.11 installation and configuration on WINDOWS10 (decompression version)
    • Install the uncompressed version of MYSQL on Windows 10 (recommended)
    • Windows installation MySQL 5.7.18 decompression version of the tutorial
    • Windows server2016 Installation MySQL5.7.19 Decompression Edition tutorial
    • Installation and backup and restore of MySQL in Windows environment

MySQL Add to System service method under Windows system (MySQL decompression version)

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.