https://www.cnblogs.com/weifeng1463/p/7941625.html
mysql> use mysql;
Database changed
mysql> grant all privileges on *.* to [email protected]‘%‘ identified by "password";
Query OK, 0 rows affected (0.00 sec)
mysql> select host,user,password from user;
+--------------+------+-------------------------------------------+
| host | user | password |
+--------------+------+-------------------------------------------+
| localhost | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E |
| 192.168.1.1 | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E |
| % | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E |
+--------------+------+-------------------------------------------+
3 rows in set (0.00 sec)
原文地址:https://www.cnblogs.com/xiufengd/p/8932894.html