Mysql 5.7.16 zip package installation and configuration methods graphic tutorial, 5.7.16 installation and configuration

Source: Internet
Author: User

Mysql 5.7.16 zip package installation and configuration methods graphic tutorial, 5.7.16 installation and configuration

As of the latest version of Mysql 5.7.16, before I wrote an article set up APMW (Portal: http://www.cnblogs.com/airoot/p/4131906.html) inside the installation of mysql method section is not suitable for the new version. Re-open the post.

Mysql Community: http://dev.mysql.com/downloads/mysql/

Because my system version is 64, download x64 here. Decompress the package to D: \ Dev \ Mysql .)

My habit is to first downloadRegister System Services. CMD open the command prompt, go to D: \ Dev \ Mysql \ bin, and install MySql as a service:

Mysqld.exe-install "servicename" (do not start the service after installation, because an error is reported)

Add Environment Variables

The procedure is as follows:

① Right-click my computer> Properties> advanced system Settings> Environment Variables

Click new Under System Variables

Input variable name: MYSQL_HOME

Input variable value: D: \ Dev \ Mysql

② Select the Path in the system variable and click the edit button.

Add the variable value % MYSQL_HOME % \ bin to the variable value (note that the original variable value must be separated by; and the original variable value cannot be deleted)

Configure the mysql. ini file

Rename the my-default.ini file under the D: \ Dev \ Mysql root directory to my. ini with the following configuration

[Mysql] # set the default character set of the mysql client default-character-set = utf8 [mysqld] # set port 3306 to port 3306 # set the mysql installation directory basedir = D: \ dev \ mysql # Set the data storage directory of the mysql database datadir = D: \ dev \ mysql \ data # maximum number of connections max_connections = 200 # The default character set used by the server is the 8-bit latin1 character set character-set-server = utf8 # default storage engine default-storage-engine = INNODB

Initialize Mysql

This is also the biggest difference from the previous version: From 5.7.7, the windows installation package does not contain the data directory, and data needs to be initialized before starting the service:

Open cmd as administrator and enter mysqld -- initialize-insecure -- user = mysql

After executing this command, MySQL creates a data folder in the root directory and creates the default database. The logon username is root and the password is blank.

Enter "net start mysql" to start the service, and OK to start the service successfully.

Log on to the Mysql database

Enter mysql-u root-p. The default password is no. Press enter to enter. root is the user name.

Use show databases; the default database generated during initialization is displayed.

 Modify the root account password

After connecting to the mysql database, run the following command to change the password:

Set password = password ('20140901 ');
Flush privileges;

Log out and log on again. Just use the new password:

Mysql-u root-p 123456

Note: After mysql5.6 (it seems that it is later than 5.6, but I cannot remember it clearly), in mysql. the password field does not appear in the user table, so it is no longer feasible to use update user set password = password ("xxx, you can only use alter user 'user' @ 'localhost' identified by '000000' to change the password.

Highlights: Installation tutorials for different mysql versions

Install MySql in different versions

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.