关于SQLSTATE[HY000] [1698]: Access denied for user ‘root’@’localhost’的问题

问题描述:

客户端可以登录,PHP无法登录。

解决方法:

select user, plugin from mysql.user;
update mysql.user set plugin = 'mysql_native_password' where user='root';

重启msyql。

发表评论?

1 条评论。

  1. SELECT count(id) as user_sum , MONTH(ctime) as create_month FROM zpb_members where year(ctime) = 2018 GROUP BY MONTH(ctime);

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.