[wp-trac] [WordPress Trac] #52496: Improve MySQL 8.0 support

WordPress Trac noreply at wordpress.org
Thu Feb 11 07:11:12 UTC 2021


#52496: Improve MySQL 8.0 support
--------------------------+--------------------
 Reporter:  jrf           |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  5.7
Component:  Database      |    Version:  5.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+--------------------
 While setting up the GH Action for the WP Importer plugin which runs the
 plugin integration tests (using the WP Core test framework) against
 various PHP/MySQL/WP combinations, I noticed a number of PHP/MySQL 8.0
 combinations which error out during the running of the WP Core test
 bootstrap with errors which seem to indicate underlying incompatibilities
 with MySQL 8.0.


 Relevant files in the Importer plugin setting up the test environment:
 * https://github.com/WordPress/wordpress-
 importer/blob/master/phpunit/install.sh
 * https://github.com/WordPress/wordpress-
 importer/blob/master/phpunit/bootstrap.php

 Test run showing the errors: https://github.com/WordPress/wordpress-
 importer/actions/runs/556887133

 == Errors reported:

 PHP 5.6 / MySQL 8.0 / WP 5.5 and latest (5.6)
 (Error line numbers are based on latest)

 {{{
 PHP Warning:  mysqli_real_connect(): Server sent charset (255) unknown to
 the client. Please, report to the developers in /tmp/wordpress/wp-includes
 /wp-db.php on line 1653
 PHP Warning:  mysqli_real_connect(): (HY000/2054): Server sent charset
 unknown to the client. Please, report to the developers in /tmp/wordpress
 /wp-includes/wp-db.php on line 1653
 PHP Warning:  mysql_connect(): Server sent charset (255) unknown to the
 client. Please, report to the developers in /tmp/wordpress/wp-includes/wp-
 db.php on line 1685
 PHP Warning:  mysql_connect(): Server sent charset unknown to the client.
 Please, report to the developers in /tmp/wordpress/wp-includes/wp-db.php
 on line 1685
 }}}

 PHP 7.0 - 7.3 / MySQL 8.0 / WP latest (5.6)

 {{{
 PHP Warning:  mysqli_real_connect(): The server requested authentication
 method unknown to the client [caching_sha2_password] in /tmp/wordpress/wp-
 includes/wp-db.php on line 1653
 PHP Warning:  mysqli_real_connect(): (HY000/2054): The server requested
 authentication method unknown to the client in /tmp/wordpress/wp-includes
 /wp-db.php on line 1653
 }}}


 **Note:** ''**with the exact same setup, the PHP 7.4/8.0 - MySQL 8.0 - WP
 5.6 test runs will pass.**''


 == Investigating needed

 I haven't dug into the code. Reporting it here for further investigation.

 I imagine that either the PHP/MySQL version check could be adjusted to
 indicate that MySQL 8.0 is only supported when running on PHP 7.4 or
 higher.

 Alternatively, the underlying issues will need to be solved.

 I also wonder if the WP Core tests in CI are being run against enough
 PHP/MySQL combinations, as I would imagine that these issues could have
 been discovered earlier if the above problem combinations would haved been
 used in WP Core CI.

 Related: #49344 #51740

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52496>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list