致力于IT技巧与知识分享

PHPMYADMIN报错SERVER SENT CHARSET (255) UNKNOWN和(HY000/2054)的解决方法

在win7上配置了php环境。apache,php,mysql都设置好了,在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的配置。

我决定修改MySQL的配置。可是我进入C:\Program Files\MySQL\MySQL Server 8.0,怎么也找不到配置文件(my.ini或者mysqld.cnf)。最后在隐藏文件夹ProgramData里找到了,完整路径是C:\ProgramData\MySQL\MySQL Server 8.0\my.ini打开my.ini做如下配置:


[mysqld]
port=3306
character-set-server=utf8
default_authentication_plugin=mysql_native_password

[mysql]
default-character-set=utf8


default-character-set=utf8


然后在cmd里输入net stop mysql80net start mysql80

再到phpMyAdmin登录就可以了。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Our Services

Worpress

Lorem ipsum dolor amet consectetur adipiscing elit. Nunc mi dui placerat eu faucibus vel, efficitur quis magna. Pellentesque habitant morbi tristique senectus et netus et malesuada.

Read More

Web Design

Lorem ipsum dolor amet consectetur adipiscing elit. Nunc mi dui placerat eu faucibus vel, efficitur quis magna. Pellentesque habitant morbi tristique senectus et netus et malesuada.

Read More

Ecommerce

Lorem ipsum dolor amet consectetur adipiscing elit. Nunc mi dui placerat eu faucibus vel, efficitur quis magna. Pellentesque habitant morbi tristique senectus et netus et malesuada.

Brand Now

SEO

Lorem ipsum dolor amet consectetur adipiscing elit. Nunc mi dui placerat eu faucibus vel, efficitur quis magna. Pellentesque habitant morbi tristique senectus et netus et malesuada.

Read More

Our Team

zahera

Zahera

(HR)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vel tempor sem. Vestibulum suscipit faucibus sem ut porta. Integer ut justo euismod, auctor turpis et

Alex

Alex

(CEO)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vel tempor sem. Vestibulum suscipit faucibus sem ut porta. Integer ut justo euismod, auctor turpis et

Alex

Sara

(CCO)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vel tempor sem. Vestibulum suscipit faucibus sem ut porta. Integer ut justo euismod, auctor turpis et

Mark

Mark

(Manager)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vel tempor sem. Vestibulum suscipit faucibus sem ut porta. Integer ut justo euismod, auctor turpis et

Testimonials

  • 一个记录信息化技巧和经验的网站
    Testimonials测试

Our Partners