码迷,mamicode.com
首页 > 数据库 > 详细

Mysql8.0命令

时间:2018-05-26 11:44:53      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:date   ati   加密   访问权限   word   必须   option   set   upd   

1.创建用户 

create user ‘username‘@‘localhost‘ identified by ‘pwd‘

2.修改访问权限

 在mysql数据下修改user表用户host为‘%‘

update user set host=‘%‘ where user=‘username‘

3.修改密码

MYSQL8.0密码默认加密方式为 default_authentication_plugin=caching_sha2_password 所以会造成不兼容问题

alter user ‘username‘@‘localhost‘ identified with mysql_native_password by ‘newpwd‘

4.修改操作权限

MYSQL 8.0不支持创建用户时授权,必须先创建,后授权

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

 

Mysql8.0命令

标签:date   ati   加密   访问权限   word   必须   option   set   upd   

原文地址:https://www.cnblogs.com/yan7/p/9092151.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!