报错
phpmyadmin报错
mysqli_real_connect(): Server sent charset (255) unknown to the client. Please, report to the developers
mysqli_real_connect(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers原因分析
这是因为在MySQL 8.0.11中,caching_sha2_password是默认的身份验证插件,而不是以往的mysql_native_password。所以和php不兼容。可以降级php,也可以修改MySQL的配置。
修复方式
打开/etc/my.cnf做如下配置:
[mysqld]
port=3306
character-set-server=utf8
default_authentication_plugin=mysql_native_password
[mysql]
default-character-set=utf8
[client]
default-character-set=utf8执行重启命令
lnmp restart再到phpMyAdmin登录就可以了。
评论 (0)