作者linlinna (美慕飆)
看板PHP
標題[請益] 連線phpMyAdmin,輸入帳號的錯誤訊息
時間Sun Feb 24 09:33:09 2019
新手發問,mac系統,請教大大
連線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
創建/etc/my.cnf,內容如下
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
重啟動mysql , 輸入帳號後,還是無法登入。錯誤訊息一樣。
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 180.217.67.117
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1550971993.A.603.html
→ JustGame: 1. 升級 PHP 到 7.1 以上 02/24 20:11
→ JustGame: 2. 用 cli 登入 MySQL ,將帳號驗證改成 mysql_native_p 02/24 20:12
→ JustGame: assword 02/24 20:12
→ JustGame: 3. MySQL 降級到 8 以下 02/24 20:12
→ JustGame: 原因是 MySQL 8 以上預設使用 caching_sha2_password 02/24 20:13
→ JustGame: 喔,還有 4. 修改 my.cnf 中的 default_authentication_ 02/24 20:14
→ JustGame: _plugin 02/24 20:15