Mysql数据库用户和访问权限
用户和访问权限的操作
1)创建hello用户,可在本机登陆,密码为hello
create user [email protected] identified by ‘hello’;
另一个shell中登陆该用户
创建用户hello,可在远程登陆,密码为hello
create user [email protected]’%’ identified by ‘hello’;
2)给[email protected]用户授权,如果为all,授权所有权限
grant all on forever. to [email protected];*
3)查看用户授权
show grants for [email protected];
4)删除指定用户授权
revoke delete,update on forever. from [email protected];*
5)刷新,重载授权表
flush privileges;
6)删除用户
drop user [email protected];