Summary of MySQL5.7 environment variables and password issues under Windows

Source: Internet
Author: User

I. Environment variables

Old routines, Computers > Properties > Environment Variables > (under System Variables) ptah> edit.

New D:\mysql-5.7.15-winx64\bin

(Note: This is my MySQL decompression/installation location)

Second, start MySQL

Command:net start MySQL

The command to stop MySQL at the same time is:net stop MySQL

Third, the error may occur here

Similar to "Access denied for user ' root ' @ ' localhost ' (using Password:yes)",

This problem occurs when you enter mysql-uroot-p and enter a password, and the following are the workarounds:

1. Open the My-default.ini file in MySQL directory, add a line "Skip-grant-tables" at the end of the file, save and name My.ini, close the file.

2. Restart the MySQL service. Stop and start first.

3, enter "Mysql-uroot-p" in the command line (do not enter a password), enter the database.

4, execute, "use MySQL;" Use the MySQL database.

5. Execute Update mysql.user set Authentication_string=password ('123qwe') where user= ' root '; Red is the password you want to set.

6. Open the My.ini file in MySQL directory, delete the last line "Skip-grant-tables", save and close the file.

7. Restart the MySQL service.

If it fails, see if you need to set the root password first.

Summary of MySQL5.7 environment variables and password issues under Windows

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.