?
This document uses PHP Chinese website manual Release
這一章節(jié)是記錄在學習過程中遇到的一些關(guān)于MySQL安裝過程中的筆記
安裝完數(shù)據(jù)庫記得清除默認的無用數(shù)據(jù),減少潛在危險
drop database test; #刪除默認數(shù)據(jù)庫 delete from mysql.user where user=''; #刪除不需要的用戶
用戶授權(quán)(with grant option 參數(shù)意為被授權(quán)的用戶擁有給其他用戶授權(quán)的權(quán)力)
grant all prilieges on *.* to test@'192.168.1.%' identified by 'aaaaaa' with grant option;
授權(quán)所有庫所有表的所有權(quán)限給test用戶
該用戶只能通過ip為192.168.1.(1~254)
登錄,密碼為aaaaaa
且該用戶有管理用戶的權(quán)限
grant creat,select,insert,update,delete on onethink.* to 'onethink'@localhost identified by 'yourPassword';
安裝完后,回收 create
權(quán)限,保留 insert
,delete
,updaet
,select
權(quán)限。
revoke create on onethink.* from 'onethink'@localhost;