mysql-5.7.18 installation under Windows

Source: Internet
Author: User

Download the MySQL compression package on the official website, according to the official website: https://dev.mysql.com/doc/refman/5.7/en/windows-installation.html Tutorial installation, but error, behind according to https:// www.oschina.net/question/1244397_2138435 solved the problem. The following is a detailed installation step. (Of course, it is recommended to download the MSI installation files directly for installation, there are fewer errors)

1. Set environment variables: In the PATH system variable to add the MySQL bin path, I extracted the compressed package to D drive, where the path is D:\mysql-5.7.18-winx64\bin

2. Add the My.ini file in D:\mysql-5.7.18-winx64 and add the following:

[Mysqld]
Basedir=d:\mysql-5.7.18-winx64
Datadir=d:\mysql-5.7.18-winx64\data

3. Open the cmd command line as an administrator, and under the bin path of the CD to MySQL, enter the following command (note that the root user's password is automatically generated for the following root account login)

Mysqld--initialize--user=mysql--console

4. Registering the Windows service: Mysqld-install

5. Start the service: net start MySQL

6. Log in to MySQL with the root account, enter the command: Mysql-u root-p, then enter the password

7. Change Password, enter: set password = password (' root '); Enter

Note: If for the first time due to an operation error, you can remove the service: mysqld Remove and delete all files under the Data folder and reinstall.

mysql-5.7.18 installation under Windows

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.