alter user ‘root‘@’localhost’identified with mysql_native_password by ‘新密码’;

这行会报错,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 'mysql_native_password by 123456' at line 1

正确如下:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐