RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1646158 - PHP Warning: mysqli::mysqli(): Server sent charset (255) unknown to the client.
Summary: PHP Warning: mysqli::mysqli(): Server sent charset (255) unknown to the client.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: php
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Remi Collet
QA Contact: RHEL Stacks Subsystem QE
Lenka Špačková
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-05 09:38 UTC by Karel Volný
Modified: 2021-01-14 09:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
.The `php-mysqlnd` database connector does not work with MySQL 8.0 The default character set has been changed to `utf8mb4` in MySQL 8.0 but this character set is unsupported by the `php-mysqlnd` database connector. Consequently, `php-mysqlnd` fails to connect in the default configuration. To work around this problem, specify a known character set as a parameter of the MySQL server configuration. For example, modify the `/etc/opt/rh/rh-mysql80/my.cnf.d/mysql-server.cnf` file to read: ---- [mysqld] character-set-server=utf8 ----
Clone Of:
Environment:
Last Closed: 2020-06-17 11:05:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
PHP Bug Tracker 74461 0 None None None 2018-11-05 09:38:42 UTC
Red Hat Bugzilla 1584253 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1584253

Description Karel Volný 2018-11-05 09:38:42 UTC
Description of problem:
PHP mysql fails to connect to MySQL 8 in default configuration due to change of default charset to utf8mb4.

Version-Release number of selected component (if applicable):
php-mysqlnd-5.4.16-46.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. install rh-mysql80 collection and stock php-mysqlnd
2. start mysql server
3. try to connect to mysql from php via mysqli functions

Actual results:
PHP Warning:  mysqli::mysqli(): Server sent charset (255) unknown to the client. Please, report to the developers in /mnt/tests/CoreOS/mysql/Security/CVE-2010-1848-mysql-multiple-insufficient-table-name-checks/CVE-2010-1848-mysqli.php on line 11
PHP Warning:  mysqli::mysqli(): (HY000/2054): Server sent charset unknown to the client. Please, report to the developers in /mnt/tests/CoreOS/mysql/Security/CVE-2010-1848-mysql-multiple-insufficient-table-name-checks/CVE-2010-1848-mysqli.php on line 11
Failed to connect to DB: Server sent charset unknown to the client. Please, report to the developers

Expected results:
(no such problem)

Additional info:
see https://bugs.php.net/bug.php?id=74461

Comment 3 Remi Collet 2019-05-29 09:22:48 UTC
doc text looks good to me, as this a the simple way.

BTW, charset can also be set from PHP using "mysqli_set_charset" function.

Comment 5 Joe Orton 2020-06-17 11:05:47 UTC
This issue is resolved in PHP 7.x in RHEL8.


Note You need to log in before you can comment on or make changes to this bug.