我在XAMPP的控制面板中启动了MySQL,并试图从MySQL命令行登录到MySQL:
C:/xampp/mysql/bin> mysql -u root -p pwd
获取此错误:
ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found.
即使运行命令mysql也会出现此错误。
我在上面找到了其他线程,因此出现了相同的错误,解决方案是进入my.ini配置文件,然后在mysqld :添加行default_authentication_plugin=mysql_native_password以使用本机密码进行身份验证。我保存了更改,重新启动了MySQL,尝试登录,但仍然给出了相同的错误。
我还能做什么才能登录呢?
发布于 2020-09-12 20:23:53
不知道是否为时已晚,但你可以解决两件事:
default_authentication_plugin=mysql_native_passwordALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';作为最后一个根,你的新密码。
https://stackoverflow.com/questions/55870732
复制相似问题