1. 程式人生 > >Mysql授權與撤權

Mysql授權與撤權

給使用者cacti賦予所有庫的所有許可權

GRANT ALL PRIVILEGES ON . TO ‘cacti’@’%’ IDENTIFIED BY ‘cacti’ WITH GRANT OPTION;

重新載入賦權表

FLUSH PRIVILEGES;

收回許可權(不包含賦權許可權)

REVOKE ALL PRIVILEGES ON . FROM cacti;

REVOKE ALL PRIVILEGES ON cacti.* FROM cacti;

收回賦權許可權

REVOKE GRANT OPTION ON . FROM cacti;

重新載入賦權表

FLUSH PRIVILEGES;