How should I change the MySQL account password? This may be a problem that many people have encountered. The following describes how to change the password of your MySQL account and how to change the password.
Use mysql
Update user set Password = password ('newpassword') where User = 'root ';
Flush privileges;
1. Modify the USER table of the MYSQL database in the MYSQL database
You can use normal UPDATE and INSERT statements.
2. Use the following command in the command line:
MYSQLADMIN-u root-p PASSWORD mypasswd
3. You can modify the MY. ini file in the MYSQL folder.
4. Use the set password statement,
Mysql> set password for myuser @ localhost = PASSWORD ('mypasswd ');
5. Use the GRANT... identified by statement
Mysql> grant usage on *. * TO myuser @ localhost identified by 'mypassword ';
The above describes how to change the MySQL account password.
Provides you with an in-depth understanding of MySQL user permissions.
MySQL user permission setting method
Back up and restore a database using MySQL Command Line
Solution to querying garbled characters in MySQL
How to delete duplicate records in MySQL