This problem is caused by too low PHP version + too high MYSQL version
MYSQL8.0+ version introduces a new character set utf8mb4
Change the old utf8 alias to utf8mb3
The old PHP’s MYSQLND module does not include the new character set
So there will be
1
2
3
4
5
6
7
|
Error when using mysqli:
PHP Warning: mysqli::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers in ... on line 3
Error when using PDO_MYSQL:
Connection failed: SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers
|
The solution is simple, just upgrade to a new PHP version
Official https://bugs.php.net/bug.php?id=74461
Written
[2018-05-02 12:13 UTC] [email protected]
1
|
Should be fixed as of 7.0.19, 7.1.5, and 7.2.0. Anyone confirm?
|
[2018-05-02 17:37 UTC] macleo at outlook dot com
1
|
Should be fixed as of 7.0.19, 7.1.5, and 7.2.0. Anyone confirm? – yes
|
So the 7.0+ version is basically OK