MySQL添加用户

添加用户:
grant all privileges on *.* to 'tube'@'192.168.0.254' indentified by "123" with grant option;

赋予来自192.168.0.254的用户tube所有权限,密码为123,并允许他赋予其他用户他自己所拥有的权利。
grant all on bookshop.* to [email protected];
赋予[email protected]针对数据库bookshop内所有表的所有权限。
grant select ,insert on bookshoop.* to [email protected];
只赋予select,insert权限
刷新权限:
flush privileges;
回收权限:
revoke select,insert on bookshop.* from [email protected];
修改密码:
update user set password="password" where user="tube";

删除用户:
drop user [email protected]

你可能感兴趣的:(mysql,用户)