grant 命令

创建拥有所有权限账户、可以远程连接、并且允许用户再将该权限授予其它用户;

grant all privileges on *.* to root @"%" identified by "root" WITH GRANT OPTION;
flush privileges;

创建只允许操作 test3 数据库的账户

grant all privileges on test3.* to test3Root @"%" identified by "test3PWD"; 
flush privileges;

猜你喜欢

转载自blog.csdn.net/xianhenyuan/article/details/91957516
今日推荐