[wp-trac] [WordPress Trac] #61218: Preparing for MySQL 8.4 compatibility

WordPress Trac noreply at wordpress.org
Thu May 30 17:51:33 UTC 2024


#61218: Preparing for MySQL 8.4 compatibility
-------------------------+-----------------------------
 Reporter:  ayeshrajans  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Database     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------------
Changes (by desrosj):

 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks @ayeshrajans!

 I opened a PR to add 8.4 to the testing matrix and came across this. I've
 temporarily removed the `--default-authentication-
 plugin=mysql_native_password` from `docker-compose.yml` for the sake of
 running the full test suite to see what else needs to be addressed. There
 [https://github.com/WordPress/wordpress-develop/actions/runs/9306623656
 does not appear to be any glaring issues related to MySQL 8.4 based on the
 successful results].

 As for how WordPress should handle this, my current opinion is that
 switching authentication plugins and updating user passwords accordingly
 is something that should be handled at the hosting level when the MySQL
 version is changed for a site. When this is handled correctly, everything
 should "just work" from a Core perspective. This is demonstrated and
 confirmed by the PR workflows passing (unless I'm missing a nuance), and
 likely from real world use given a lack of tickets being opened for
 related problems here in Trac.

 However, the one place we need to decide on how to handle this is within
 the local development environment. When switching PHP versions, someone
 could just reset and restart the environment manually ensuring the right
 plugin is used. But that's easy to forget, and there could be scenarios
 where someone would want to preserve the state of their database. It would
 be nice if there were a way to just handle this.

 We can't just remove `--default-authentication-
 plugin=mysql_native_password` because the environment will be broken on
 PHP < 7.4. We could leave it and turn the plugin on within the
 environment, but that runs counter to the recommended best practices.

 I haven't tested this yet, but I'm wondering if we could do some form of
 the following:

 - Remove the `--default-authentication-plugin=mysql_native_password`
 command from the `docker-compose.yml` file.
 - Add a `docker run` command when the environment starts up to run the
 necessary `ALTER USER` commands based on the configured version of PHP.

 I'm going to move this to `Future Release`, but this can be moved to a
 numbered milestone whenever an approach is agreed upon.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61218#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list