ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘;记录

Posted 空中旋转篮球

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘;记录相关的知识,希望对你有一定的参考价值。

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';

以上是关于ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘;记录的主要内容,如果未能解决你的问题,请参考以下文章