阅读背景:

mysql数据库配置问题:授权指定库给指定mysql账号访问

来源:互联网 

1.管理员对指定账号进行授权

grant all privileges on 数据库名.* to '账号名'@'%' identified by '账号密码';

# 示例:
'''
数据库名:shuchengyi
账号名:shucheng
密码:shucheng
'''
grant all privileges on shuchengyi.* to 'shucheng'@'%' identified by 'shucheng';

# 如要授权的账户未被创建则自动创建该账号grant all privileges on 数据库名.* 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: