linux mysql 新增用户 分配权限

insert into mysql.user(Host,User,Password) values("%","admin",password("admin"));

 

grant all privileges on *.* to 'admin' identified by 'admin';

grant all privileges on *.* to admin@localhost identified by 'admin';

grant all privileges on *.* to admin@'%'identified by 'admin';

flush privileges;   刷新权限

posted on 2016-04-26 16:15  杭州糊涂虫  阅读(141)  评论(0编辑  收藏  举报

导航