MySQL 5.7.13 winx64 Install configuration tutorial _mysql

Source: Internet
Author: User
Tags flush

Windows install mysql5.7 (climb over multiple pits) summary

Steps:

1, download Mysql-5.7.13-winx64.zip compression package. Website Download Address http://mirrors.sohu.com/mysql/

2, extract to the directory you want. I unzipped to f:/opt to rename mysql-5.7.13-winx64 to MySQL.

3. Change the My-default.ini into My.ini

Use the command prompt administrator to open cmd

Under the MySQL directory

1. Initialization configuration

Enter MYSQLD--initialized initialization configuration to display

This is a MySQL directory without the data directory, go to the MySQL directory to create a data directory. F:opt\data

Do one more mysqld--initialize

Look at the data directory.

If not, uninstall the MySQL installation package again, and then unzip it again starting with the first step.

2. Create MySQL service mysqld--install custom MySQL service name

3, open MySQL service net start MySQL service name

4, login MySQL input mysql-u root

Logon verification needs to be skipped

My-default.ini changed to My.ini. (why this operation, MySQL will perform my.ini will not find My-default.ini. Only modified in My-default.ini, not executed, and will not succeed.

Join Skip-grant-tables on the last line of My.ini

Restart MySQL

Execute Command mysql-uroot

5, modify the password

MySQL 5.7.6 and latest version:

Copy Code code as follows:
mysql> Update user Set Authentication_string=password (' 123456 ') where user= ' root ';

MySQL 5.7.5 or earlier version r:

Copy Code code as follows:
# mysql> Update user set Password=password (' 123456 ') where user= ' root ';

5.1 Refreshing the database

FLUSH privileges;

5.2 Modifying Extranet permissions

Accessible for all servers, modified to this

Copy Code code as follows:
Grant all privileges in *.* to ' root ' @ '% ' identified by ' MyPassword ' with Grant OPTION;

If you are only able to access the 192.168.13.56 server, modify this

Copy Code code as follows:
Grant all privileges in *.* to ' root ' @ ' 192.168.13.56 ' identified by ' MyPassword ' with GRANT OPTION;

5.3 Remove the My.ini skip-grant-tables

Re-login MySQL

5.4, in order to facilitate the MySQL directory into the PATH environment variable F:/opt/mysql/bin

It can be opened in CMD.

After installing MySQL, after landing, regardless of running any command, always prompt this mac MySQL error you must reset your password using ALTER USER statement befor e executing this statement.

Step 1:set PASSWORD = PASSWORD (' Your new PASSWORD ');

Step 2:alter USER ' root ' @ ' localhost ' PASSWORD EXPIRE NEVER;

Step 3:flush privileges;

Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.