mysql8版本后一些命令冲突

1.修改密码

// 8以前
 set password for 用户名@localhost = password('新密码');  
 //8以后
 ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';

2.赋权操作

//8以前:

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
//8以后
create user root@'%' identified by '123456';
grant all privileges on *.* to root@'%' with grant option;

猜你喜欢

转载自blog.csdn.net/weixin_43859562/article/details/117439805