Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: PHP Warning: mysqli::mysqli(): Server sent charset (255) unknown to the client.
Product: Red Hat Enterprise Linux 7 Reporter: Karel Volný <kvolny>
Component: phpAssignee: Remi Collet <rcollet>
Status: CLOSED CURRENTRELEASE QA Contact: RHEL Stacks Subsystem QE <rhel-stacks-subsystem-qe>
Severity: unspecified Docs Contact: Lenka Špačková <lkuprova>
Priority: unspecified    
Version: 7.6CC: jorton, lkuprova, pasik, rcollet
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 ----
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-17 11:05:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.