MYSQL creates the user, and authorizes, modifies the password.
Create a user and grant all permissions to law
Create user [email protected];
Grant all privileges on * * to [e-mail protected] identified by ""; ----OK
Create a local user blank password and grant the relevant selection, update and other permissions, and can only be used for MySQL database.
Create user [email protected];
Grant Select,update,insert on mysql.* to [e-mail protected] identified by "";
Change Law's password
mysql> Set password for [email protected] = "123.law";
ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number
When you enter a 123.law password directly, you will be prompted with an error, where you need to convert the password to 16 binary.
The command is:
Select Password ("123.law");
mysql> Select password (' 123.law ');
+-------------------------------------------+
| Password (' 123.law ') |
+-------------------------------------------+
| *2ffdfcdc4937db95ac813d3962becf39b3d78be3 |
+-------------------------------------------+
1 row in Set (0.00 sec)
After you get a string of 16 passwords, execute the command again:
********************************************************************************************
* Set password for [email protected] = "*2ffdfcdc4937db95ac813d3962becf39b3d78be3"; *
*******************************************************************************************
The following is the official MySQL execution command when executing phpmyadmin:
REVOKE all privileges on *. * from ' lisa ' @ '% ';
REVOKE GRANT OPTION on *. * from ' lisa ' @ '% ';
GRANT SELECT,
INSERT,
UPDATE,
DELETE on *. * to ' Lisa ' @ ' percent ' with max_queries_per_hour 0 max_connections_per_hour 0 max_updates_per_hour 0 max_user_connections 0;
This article is from the "Overlord Collected Works '" blog, please be sure to keep this source http://zhangtainren.blog.51cto.com/448826/1539386