您的位置:首页 > 博客中心 > 数据库 >

mysql用户创建、授权

时间:2022-03-10 18:06

#test表示你要建立的用户名,后面的123表示密码
#用户可以在任何地方登陆
mysql> create user test identified by‘123‘;
#限制在固定地址登陆
mysql> create user test@localhost identified by ‘123‘;

#格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码"
mysql> grant all on *.* to user@localhost
mysql> grant select,insert,update,delete on *.* to test@"%" identified by "123";
mysql> flush privileges;




mysql用户创建、授权,布布扣,bubuko.com

热门排行

今日推荐

热门手游