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