update user set password = password ('xxxx') where user = "root";
grant all privileges on *.* to root@'%' identified by 'xxxx';
其它參數的例子:
grant select,insert,update,delete,create,drop on vtdc.employee to joe@10.163.225.87 identified by '123';
給來自10.163.225.87的用戶joe分配可對數據庫vtdc的employee表進行select,insert,update,delete,create,drop等操作的權限,并設定口令為123。
要重啟一次MYSQL才能使本地用戶密碼生效:
/usr/local/mysql/support-files/mysql.server restart
posted on 2009-02-12 14:31
我愛佳娃 閱讀(1656)
評論(0) 編輯 收藏 所屬分類:
DB相關