1: grant 權限1,權限2 on *.* to usename@"主機名或者IP" identified by "password"
例1、增加一個用戶weiyong密碼爲avcon,讓他可以在任何主機上登錄,並對所有數據庫有查詢、插入、修改、刪除的權限。首先用以root用戶連入MySQL,然後鍵入以下命令:
mysql> grant select ,insert ,update,delete on *.* to weiyong@"%" identified by "avcon";
1: grant 權限1,權限2 on *.* to usename@"主機名或者IP" identified by "password"
例1、增加一個用戶weiyong密碼爲avcon,讓他可以在任何主機上登錄,並對所有數據庫有查詢、插入、修改、刪除的權限。首先用以root用戶連入MySQL,然後鍵入以下命令:
mysql> grant select ,insert ,update,delete on *.* to weiyong@"%" identified by "avcon";