首页 > 数据库技术 > 详细

mysql5.7创建用户 分配权限

时间:2020-04-07 12:22:04      阅读:66      评论:0      收藏:0      [点我收藏+]

创建用户(%表示随处可登录,localhost表示只能本地登录

create user ‘username‘@‘%‘ identified by ‘password‘;

 

分配权限

grant all privileges on tableName.* to ‘username‘@‘%‘;

 

刷新权限

flush privileges;

 

如果报错ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

先执行flush privileges;再进行操作

mysql5.7创建用户 分配权限

原文:https://www.cnblogs.com/uzxin/p/12652363.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!