Linux organized several methods for cracking the mysqlroot password circulating on the Internet: Method 1: Use phpmyadmin, which is the simplest. Modify the user table of the mysql database, but do not forget to use PA.
Linux organized several methods for cracking the mysql root Password circulating on the Internet: Method 1: Use phpmyadmin, which is the simplest. Modify the user table of the mysql database, but do not forget to use PA.
The Linux community has compiled several methods for cracking the mysql root Password circulating on the Internet:
Method 1
Use phpmyadmin, which is the simplest. Modify the user table of the mysql database, but do not forget to use the PASSWORD function.
Method 2
Use mysqladmin, which is a special case stated above.
Mysqladmin-u root-p password mypasswd
After entering this command, you need to enter the original root password, and then the root password will be changed to mypasswd. Change the root in the command to your username, and you can change your password.
Of course, if your mysqladmin cannot connect to mysql server, or you cannot execute mysqladmin, this method is invalid, and mysqladmin cannot clear the password.
The following methods are used at the mysql prompt and must have the root permission of mysql:
Method 3 mysql> Insert INTO mysql. user (Host, User, Password)
VALUES ('%', 'Jeffrey ', PASSWORD ('biscuit '));
Mysql> FLUSH PRIVILEGES
Specifically, this is adding a user with the username jeffrey and password biscuit. I wrote this example in mysql Chinese reference manual.
Be sure to use the PASSWORD function, and then use flush privileges.
Method 4 is similar to method 3, but the REPLACE statement mysql> replace into mysql. user (Host, User, Password) is used)
VALUES ('%', 'Jeffrey ', PASSWORD ('biscuit'); mysql> FLUSH PRIVILEGES
Method 5 use the set password statement, mysql> set password for jeffrey @ "%" = PASSWORD ('biscuit ');
You must use the PASSWORD () function, but do not need to use flush privileges.