docker-library / docker-library/wordpress
`wordpress:cli` is shipped with mysql client that is incompatible with mysql server 8.0+
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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