添加用户:
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;
时间: 2024-10-01 02:39:37