Windows mysql5.7 Installation Tutorial

Source: Internet
Author: User
Tags ini

mysql5.7 installation configuration method, organize a share for everyone

First, download

Click to download: MySQL 5.7.msi

Second, the installation

Double-click Mysql.msi and follow the prompts to install.

Issues to be aware of after installation (emphasis)

Set MySQL environment variable (let MySQL be invoked under any path in cmd)

1, the right mouse click Computer, click Properties

2, select the Advanced system variable settings, click on the environment variables

3, in the system variable inside select path, click Edit

4, in the final add "; C:\Program files\mysql\mysql Server 5.7 ", (C:\Program Files\mysql\mysql Server 5.7 is the root directory installed for MySQL, and if you have changes when you install it, enter the changed path. Note that there is a front of the root directory; Click OK and then point to confirm, exit

Third, the initialization of MySQL

1, into the mysql5.7 after the installation of the root path (the default installation path is C:\Program files\mysql\mysql Server 5.7, if you have changed the installation, you change the path), after the root directory

2, MySQL root directory structure as follows

3, in the current directory to replicate a copy of My-default.ini renamed to My.ini, at this time the directory structure is

4, with Notepad or other text editor to open the My.ini file, the end of the contents of the file to add "Skip_grant_tables", save the file.

5, with cmd, into the root directory Bin folder

Press the Windows Home key (Alt key to the left of the keyboard, a key to the left, the shape of "field") +r, enter cmd, press ENTER

Enter "CD C:\Program files\mysql\mysql Server 5.7**bin**" in the pop-up window

Enter "Mysqld--initialize", carriage return, the root directory will generate the data folder, at this time MySQL initialization completed, initialization after the completion of the root directory structure as shown below

Four, the MySQL registration as the system service

1, press Windows Home key +r (keyboard lower left corner alt key to the left, the shape of "field"), input cmd, press ENTER

2, in the pop-up window input "CD C:\Program files\mysql\mysql Server 5.7**bin**" carriage return

3, input "mysqld--install", carriage return, the following figure (I have registered before service, so will prompt service already)

4, now can be used in cmd inside the "net start MySQL" to start the MySQL service, using "net stop MySQL" to stop the service. (need to set MySQL environment variable)

Five, change MySQL initialization password

1, at the root of the My.ini file to add the last "Skip_grant_table", Save the exit (previously done, you can skip).

2, open the cmd in turn enter the following command, press ENTER (appear enter password prompt, press ENTER directly)

1

2

3

4

5

Mysql-u root-p;

Use MySQL;

Updateusersetauthentication_string=password ("123456") whereuser= "root";

Flushprivileges;

Updateusersetpassword_expired= "N" whereuser= "root";

3, the root directory of the My.ini file to add the last "skip_grant_table" deleted, save to restart MySQL, you can use the new password landing.

The above steps are executed sequentially, mysql-5.7 can be successfully installed.

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.