授權(quán)該用戶所有權(quán)限,只能本機(jī)登錄:
grant all on databasename.tablename to username@localhost Identified by "password";
flush privileges;
注:databasename指數(shù)據(jù)庫名 tablename 表名 全部表可以用* username 用戶名 password 密碼
授權(quán)該用戶部分權(quán)限,只能某個IP段登錄:
grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP on cbc.* to username@'192.168.1.0/255.255.255.0' Identified by "password";
取消授權(quán):
revoke all privileges on *.* from mastert@'%'
問題:如何關(guān)閉MYSQL某用戶禁止備份還原?
發(fā)表評論