`
lxj8749
  • 浏览: 67731 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

mysql 创建修改删除用户

阅读更多

创建

create user 'test1'@'localhost/127.0.0.1' identified by '123' 本机权限
create user 'test1'@'%' identified by '123' 所有权限

删除

drop user 'user'@'host'
撤销用户权限

revoke all on *.* from 'test'@'localhost';


更改用户名

rename user 'test'@'localhost' to 'test1'@'%';

增加权限

GRANT ALL PRIVILEGES ON app.* TO webuser@"%";

grant select,update(field1,field2) on dbname.tablename to 'test1'@'%'
grantselecton testdb.*to common_user@'%'
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics