mysql> grant all on *.* to test@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
查看用户的权限:
mysql> show grants for test@'%';
+--------------------------------------------------------------------------------------------------------------+
| Grants for test@% |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' IDENTIFIED BY PASSWORD '*2862D369024841A05C809285BEA487080138BDF2' |
+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
网名:bass 分享技术 突破难点 创新思维