1. 程式人生 > >mysql添加用戶並賦予權限命令

mysql添加用戶並賦予權限命令

rop delet 單個 del logs 用戶 flush lec local

添加用戶:

create user gouge@localhost identified by gouge;

賦予權限:

給gouge 用戶賦予所有test開頭的數據庫權限 (test% 代表已test開頭的數據庫,如果指定單個數據庫去掉%即可)

1 grant select,insert,update,delete,create,drop,alter on `test%`.* to gouge@% identified by gouge;
2 FLUSH PRIVILEGES;

添加最高權限

grant ALL PRIVILEGES on `test%`.* to 
gouge@% identified by gouge; FLUSH PRIVILEGES;

mysql添加用戶並賦予權限命令