Home > Database > Mysql Tutorial > body text

mysql 5.7.20 How to change password

藏色散人
Release: 2020-10-23 09:51:13
Original
2889 people have browsed it

How to change the password in mysql 5.7.20: First log in to the system as the system administrator; then open cmd; finally change the password through the "update user set authentication_string=password('123456') ..." command. Can.

mysql 5.7.20 How to change password

Recommended: "mysql video tutorial"

mysql 5.7.20 Change the root password.

1. Log in to the system as a system administrator.

2. Open cmd

Check whether mysql is started. net start mysql

If you start it, stop it. Net stop mysql

3. Skip the permission check and start mysql. Click the bin directory in mysql, then hold down the shift right key, and then select open command window

Paste in mysqld-nt --skip-grant-tables

4. User login mysql -uroot -p

Select database use mysql;

5 . The password field in the mysql5.7 version is not password, so we enter the following sentence to reset the password

  update user set authentication_string=password('123456') where user='root';
Copy after login

6. Refresh flush privileges;

7. Exit quit; and restart the service.

The above is the detailed content of mysql 5.7.20 How to change password. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!