#test表示你要建立的用户名,后面的123表示密码 #用户可以在任何地方登陆 mysql> create user test identified by‘123‘; #限制在固定地址登陆 mysql> create user [email protected] identified by ‘123‘;
#格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码" mysql> grant all on *.* to [email protected] mysql> grant select,insert,update,delete on *.* to [email protected]"%" identified by "123"; mysql> flush privileges;
时间: 2024-12-22 21:57:37