用户锁定相关
查看用户是否锁定:
select user,host,account_locked from mysql.user;
锁定用户:
ALTER USER 'demo'@'localhost' ACCOUNT LOCK;
解锁用户:
ALTER USER 'demo'@'localhost' ACCOUNT UNLOCK;
根据对象查看用户权限
查看一个schema有哪些用户权限:
select grantee from information_schema.schema_privileges where table_schema='main_db';
网友评论