📜  授予 mysql 用户名撤销权限 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:51.347000             🧑  作者: Mango

代码示例1
#in SQL execute
#GRANT type_of_permission ON database_name.table_name TO 'username'@'localhost';
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';
#reload all the privileges
FLUSH PRIVILEGES;

#Show Privileges
SHOW GRANTS FOR 'username'@'localhost';

#Revoke Privileges
REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';