Bug #74461 [NEW]: mysqlnd error on utf8mb4 charset used by MySQL 8.0
From: bill at karwin dot com
Operating system:
PHP version: 7.1.4
Package: MySQLi related
Bug Type: Bug
Bug description:mysqlnd error on utf8mb4 charset used by MySQL 8.0
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
--
Edit bug report at https://bugs.php.net/bug.php?id=74461&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74461&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74461&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74461&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74461&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74461&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74461&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74461&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74461&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74461&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74461&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74461&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74461&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74461&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74461&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74461&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74461&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74461&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74461&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74461&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74461&r=mysqlcfg
Thread (9 messages)
- bill at karwin dot com