首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql 创造修改删除用户

2013-07-11 
mysql 创建修改删除用户创建create user test1@localhost/127.0.0.1 identified by 123 本机权限cre

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@'%'

热点排行