09_创建mysql数据库的用户

创建mysql用户

1. create user '账户'@'%' identified by'密码';

2. 授权用户

grant all on *.* to '账户'@'%';    # 授权全部数据库

grant all on privileges on cheng.* to '账户'@'%';        # 后面的%表示允许在所有主机上登录

3. 刷新: flush privileges;

4. 此时,就可以使用刚创建的用户进行登录了

猜你喜欢

转载自www.cnblogs.com/nichengshishaonian/p/11567466.html
今日推荐