使用MySQL命令行新建用户并授予权限

来源:互联网 发布:撤销中国根域名服务器 编辑:程序博客网 时间:2024/06/04 17:46

root用户登录mysql:

grant all privileges on *.* to hive@"localhost" identified by "hive" with grant option;


grant all privileges on数据库名称(*表示任意数据库).表名(*表示任意表) to 用户名@"ip地址(%表示任意ip都能登录)" identified by "密码" with grant option;


 flush privileges//刷新用户权限

0 0
原创粉丝点击