Make WordPress Core


Ignore:
Timestamp:
10/28/2024 05:36:17 PM (3 months ago)
Author:
desrosj
Message:

Build/Test Tools: Add MySQL 8.4 support to the Docker environment.

Because caching_sha2_password is not supported on PHP 7.2 & 7.3, the local Docker environment has used the --default-authentication-plugin system variable to always make use of mysql_native_password despite MySQL 8.0 deprecating this auth plugin.

However in MySQL 8.4, the --default-authentication-plugin option was removed in favor of --authentication-policy, and mysql_native_password is now disabled by default. mysql_native_password has also been removed in MySQL 9.0.

This change adds support to the local Docker environment for MySQL 8.4 by adding some helper functions that determine which authentication plugin should be used based on the configured PHP/MySQL versions and automatically making the necessary configuration adjustments.

Reviewed by peterwilsoncc.
Merges [59279] to the 6.7 branch.

Props ayeshrajans, johnbillion, aristath, jorbin.
See #61218.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/docker-compose.yml

    r58157 r59309  
    8080
    8181    # For compatibility with PHP versions that don't support the caching_sha2_password auth plugin used in MySQL 8.0.
    82     command: --default-authentication-plugin=mysql_native_password
     82    command: ${LOCAL_DB_AUTH_OPTION-}
    8383
    8484    healthcheck:
Note: See TracChangeset for help on using the changeset viewer.