Mysql 5.7.17 winx64 installation and configuration graphic tutorial, 5.7.17winx64

Source: Internet
Author: User

Mysql 5.7.17 winx64 installation and configuration graphic tutorial, 5.7.17winx64

I have summarized the notes for installing mysql and shared them with you.

Step 1:Download mysql-5.7.17-winx64 unzip version: http://dev.mysql.com/downloads/mysql/

Step 2:Unzip to the installation directory, such as: C: \ myprogram \ mysql-5.7.17-winx64

Step 3:Set Environment Variables

The procedure is as follows:

1) Right-click my computer-> properties-> advanced system settings (advanced)-> Environment Variables
Click new Under System Variables
Input variable name: MYSQL_HOME
Input variable value: C: \ myprogram \ mysql-5.7.17-winx64

2) Select the Path in the system variable
Click Edit
Add the variable value % MYSQL_HOME % \ bin to the variable value.
Note that this variable is added after the original variable value and separated by;. The original variable value cannot be deleted.

Step 4:Modify the my. ini file under the C: \ myprogram \ mysql-5.7.17-winx64 folder and if not, copy the my-default.ini for modification:

######################################## ################ [Client] port = 3306 default-character-set = utf8 [mysqld] port = 3306 character_set_server = utf8 basedir = % MYSQL_HOME % # decompress the directory datadir = % MYSQL_HOME % \ data # decompress the data DIRECTORY SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [WinMySQLAdmin] % MYSQL_HOME % \ bin \ mysqld.exe ########

Step 5:Register mysql as a windows system service

1) Run cmd as an administrator and go to the bin directory under the MySQL extract directory from the console:

2) enter the service installation command:

Mysqld install MySQL -- defaults-file = "% MYSQL_HOME % \ my. ini"
# Decompress the my. ini file modified in the directory
After the installation is successful, a message is displayed, indicating that the service is successfully installed.
# Note: Put the my. ini file in the root directory after MySQL Decompression
# The command for removing a service is mysqld-remove.

Step 6:Start MySQL Service

Method 1:Run the following command to start the service: net start mysql.
Method 2:

Open the management tools service and find the MySQL service.

Right-click Start or click Start on the left to start the service.

Step 7:Modify the password of the root account

When the installation is complete, the default password of the root account is blank. You can change the password to the specified password. Example: 123456

 c:>mysql –u root mysql>show databases; mysql>use mysql; mysql>UPDATE user SET password=PASSWORD("123456") WHERE user='root'; mysql>FLUSH PRIVILEGES; mysql>exit

However, you cannot log on successfully.

Step 8:Modify the my. ini file, add the following command under [mysqld]: skip-grant-tables, and then restart the mysql service.

Step 9:Log on to change the root user password

c:>mysql –u root mysql>show databases; mysql>use mysql; mysql> UPDATE user SET authentication_string = PASSWORD('123456') WHERE user = 'root'; mysql>FLUSH PRIVILEGES;

In this case, edit the my. ini file to delete the skip-grant-tables line, and restart MySQL. Otherwise, MySQL can still log on without a password. After the logon succeeds, exit and log on again to test whether the logon is successful.

Note:Use navicat to connect to mysql. IfMySQL error code 1862: Your password has expired, or enter the bin directory in the running window,> mysql-uroot-p123456, and then run select * from mysql. users
ERROR 1820 (HY000): You must set password before executing this statement

Solution:MySQL> set password = PASSWORD ('20140901 ');

Query OK, 0 rows affected (0.03 sec)

Then select * from mysql. users, and navicat can be connected successfully.

Highlights: mysql installation tutorials for different versions mysql5.7 installation tutorials for various versions mysql5.6 installation tutorials

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.