Home > Article > Backend Development > How to change the wireless router password? Summary of how to change password in MySQL
Method 1
Use phpmyadmin, this is the simplest, modify the user table of the mysql library,
But don’t forget to use the PASSWORD function.
Method 2
Use mysqladmin, which is a special case stated earlier.
mysqladmin -u root -p password mypasswd
After entering this command, you need to enter the original password of root, and then the root password will be changed to mypasswd.
Change root in the command to your username, and you can change your own password.
Of course, if your mysqladmin cannot connect to the mysql server, or you cannot execute mysqladmin,
then this method is invalid.
And mysqladmin cannot clear the password.
The following methods are used at the mysql prompt and must have mysql root permissions:
Method 3
mysql> INSERT INTO mysql.user (Host,User,Password)
VALUES('%','jeffrey',PASSWORD ('biscuit'));
mysql> FLUSH PRIVILEGES
To be precise, this is adding a user with the username jeffrey and the password biscuit.
There is this example in the "mysql Chinese Reference Manual", so I wrote it out.
Note to use the PASSWORD function, and then use FLUSH PRIVILEGES.
Method 4
Same as method 3, just using the REPLACE statement
mysql> REPLACE INTO mysql.user (Host,User,Password)
VALUES('%','jeffrey',PASSWORD('biscuit'));
mysql> FLUSH PRIVILEGES
Method 5
Use the SET PASSWORD statement,
mysql> SET PASSWORD FOR jeffrey@"%" = PASSWORD('biscuit');
You must also use the PASSWORD() function,
But there is no need to use FLUSH PRIVIL EGES.
Method 6
Use GRANT ... IDENTIFIED BY statement
mysql> GRANT USAGE ON *.* TO jeffrey@"%" IDENTIFIED BY 'biscuit';
The PASSWORD() function is unnecessary here, and there is no need to use FLUSH PRIVILEGES .
Note: PASSWORD() [not] performs password encryption in the same way as Unix password encryption.
The above has introduced how to change the wireless router password. A summary of the MySQL password changing methods, including how to change the wireless router password. I hope it will be helpful to friends who are interested in PHP tutorials.