|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbilm (last revision 2020-03-11 15:10 UTC by tarik at hotmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-04-17 16:23 UTC] bill at karwin dot com
[2017-04-17 16:36 UTC] nikic@php.net
[2018-05-02 12:11 UTC] macleo at outlook dot com
[2018-05-02 12:13 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2018-05-02 12:13 UTC] requinix@php.net
[2018-05-02 17:37 UTC] macleo at outlook dot com
[2018-05-02 18:15 UTC] requinix@php.net
-Status: Feedback
+Status: Closed
-Assigned To:
+Assigned To: johannes
[2020-03-11 15:10 UTC] tarik at hotmail dot com
[2023-01-09 13:38 UTC] erenlolbtw97 at gmail dot com
[2024-05-21 20:20 UTC] stevenwilkins22 at hotmail dot co dot uk
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 11:00:02 2025 UTC |
Description: ------------ PHP 7.1 fails to connect to MySQL 8.0.x because of charset incompatibility with MySQL 8.0's new default server charset of utf8mb4. The workaround is to change the server charset back to pre-MySQL 8.0 default of utf8. Test script: --------------- $mysqli = new mysqli('127.0.0.1', 'root', 'xxxx', 'test'); $pdo = new PDO('mysql:host=127.0.0.1;dbname=test', 'root', 'xxxx'); Expected result: ---------------- There should be no error. Actual result: -------------- 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