1.低版本执行修改密码语句
select password("1212");
当前版本为:
2.高版本执行
select password("1212");
报如下错误:
[SQL]select password("1212");
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '("1212")' at line 1
3.报错原因
查看相关资料说8.0以上版本去掉了select password()函数。所以报错
4.解决办法
alter user'root'@'localhost' identified by '新密码';
alter user'root'@'localhost' identified with mysql_native_password by '新密码';