mysql用户授权

select host, user, authentication_string, plugin from mysql.user;
grant all privileges on *.* to root@"%" identified by "aaa+Pe4" ;

create user 'root'@'10.%' identified by 'aaa';
grant all privileges on *.* to 'root'@'10.%' identified by "aaa" ;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.%'  WITH GRANT OPTION;

grant select on xesbi.* to spylisel@"10.%"  ;

show grants for 'testUser'@'%';

flush privileges;


高版本授权分布执行:
create user 'root'@'%' identified by  'password';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
posted @ 2022-05-07 16:58  大川哥  阅读(104)  评论(0编辑  收藏  举报