MySQL8.0新特性

一、修改密码
修改root密码之前要先flush privileges;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'fanjinbao_%@!';

二、添加用户
CREATE USER `fansik`@`%` IDENTIFIED BY 'fanjinbao_%@!';GRANT ALL ON *.* TO `fansik`@`%` WITH GRANT OPTION;
FLUSH PRIVILEGES;
如果添加的用户在用navicat登录是报client does not support authentication错误
ALTER USER 'fansik'@'%' IDENTIFIED WITH mysql_native_password BY 'fanjinbao_%@!';
FLUSH PRIVILEGES;
posted @ 2018-08-23 18:41  fansik  阅读(135)  评论(0编辑  收藏  举报