Install and configure Mysql5.7.14

Source: Internet
Author: User

Install and configure Mysql5.7.14

This article mainly covers how to install mysql5.7.14 using the previous installation method to solve problems such as logon Failure and password failure. I hope this will help my friends who are equally troubled.

The specific process is as follows:

1. Software Download:

1. Download mysql5.7.14through http://dev.mysql.com/downloads/mysql.

2. decompress the downloaded file. The decompressed directory of the author is: D: \ Program Files (x86) \ MySQL-5.7.14-winx64.

2. Preparations before installation:

1. Configure environment variables and configure D: \ Program Files (x86) \ mysql-5.7.14-winx64 \ bin to path.

2. Copy, paste, and rename the my-default.ini under the decompression path to my. ini.

3. Open my. ini (Editplus is recommended for clear layout) and add the following information:

 

Port is the port number of the connected database,

Datadir is the directory for storing database data,

Basedir is the decompression path of the database.

Iii. Installation Process:

1. Run the windows command line as an administrator.

2. Enter the bin folder in the mysql decompression directory.

 

3. Run the following command:mysqld –initialize –user=mysql –console

(The command must be executed in the bin directory of the mysql decompression file)

4. The execution result is as follows (the arrow indicates the generated password and saves it ):

 

5. Execute the command to install the mysql database ():

 

6. After the installation is successful, you can use net start mysql to start the mysql service:

 

If the mysql service fails to be started at this time, the possible cause is that the preceding command is not executed in the bin directory. The solution is to remove the mysql service: mysqld-remove, and then re-execute the command from step 3.

7. After the service is successfully started, you can log on to mysql as follows:

 

An error occurred. Change the password first.

Add one line after [mysqld] In the my. ini fileskip-grant-tables. Close the mysql service and restart it. At this time, you do not need to enter the password for logon. As follows:

 

Run the following command:

 

Run the command to change the password:

 

8. After the operation is successful, the password is modified successfully. Delete skip-grant-tables in my. ini and restart the service. So far, the mysql database is successfully installed.

9. Some friends encounter the following problems when starting third-party database tools, such as navicat for mysql:

 

This is because the mysql database used a new security policy after 5.7.

Solution:

1) re-Modify the root password set password for 'root' @ 'localhost' = PASSWORD ('123 ');

2) run the following command:

ALTER USER 'root'@localhost' PASSWORD EXPIRE INTERVAL 90 DAYS;ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;ALTER USER 'root'@'localhost' PASSWORD EXPIRE DEFAULT;

First sentence validity period Verification 90 days

The second sentence does not verify the validity period

The third sentence is set to the default value.

 

10. Now, navicat for mysql can connect to the database normally.

The above is a graphic tutorial on how to install and configure Mysql5.7.14. I hope it will help you. If you have any questions, please leave a message and I will reply to you in time. Thank you very much for your support for the help House website!

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.