docker-library / docker-library/wordpress

`wordpress:cli` is shipped with mysql client that is incompatible with mysql server 8.0+

Open
#927 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

WP images ship with a mysql client that is assembled from MariaDB sources and doesn't have support for caching_sha2_password.

$ mysql -V
mysql  Ver 15.1 Distrib 10.11.8-MariaDB, for Linux (x86_64) using readline 5.1

This is because MariaDB Server does not currently support caching_sha2_password as documented here.

When using mysql 8.0+ as the server, and running wp db cli for example, we get this error:

ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: Error loading shared library /usr/lib/mariadb/plugin/caching_sha2_password.so: No such file or directory

This is because mysql 8.0+ uses caching_sha2_password as it's default authentication plugin as documented here: In MySQL 8.0, caching_sha2_password is the default authentication plugin rather than mysql_native_password.

I found PR #902 regarding the issue. Installing that package likely fixes the issue because it provides the caching_sha256_password plugin, which is compatible with MySQL's caching_sha2_password as documented here.

@tianon I am unsure if that would actually be a robust fix, but here's the issue explained more in detail.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #902 and reproducing the reported wp db cli failure from a wordpress:cli image against a MySQL 8.0+ server. Determine whether the proposed client package provides the required authentication plugin; done means the CLI connects successfully using caching_sha2_password.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, shell, wordpress
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.