Mysql数据库授权

21. May 2020 DataBase 0

不用用户不同权限的操作重要性毋庸置疑,记录下

show grants for ***@localhost; 查看用户的授权列表
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, REFERENCES, ALTER ON database1.* TO `***`@`localhost`;
REVOKE SELECT, INSERT, UPDATE, DELETE, CREATE, REFERENCES, ALTER ON database1.* FROM `***`@`localhost`;
flush privileges;