Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL issue #1

Open
xiehan opened this issue Oct 2, 2018 · 0 comments
Open

MySQL issue #1

xiehan opened this issue Oct 2, 2018 · 0 comments

Comments

@xiehan
Copy link

xiehan commented Oct 2, 2018

Thank you for setting this up! It has mostly worked, but I did run into one tricky issue that took me a while to debug.

docker-compose.yml currently specifies the following database setup:

  database:
    image: mysql

However, this past April, the mysql:latest Docker image (which is what gets installed if you just specify mysql) was apparently updated to point to MySQL 8.0 and so that's what gets installed just following your Composer settings verbatim. Unfortunately, there's an issue where MySQL 8.0.4 is using a new authentication plugin called caching_sha2_password that most of us don't have installed because it wasn't included in earlier versions of MySQL. (It took me a bit of digging to figure out what the issue is; props to this thread: passbolt/passbolt_docker#103)

This leads to the following bug when running the docker-compose run sspak load snapshots/<sspak> public step:

ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
Command: echo 'create database if not exists `SS_mysite`' | mysql '--user=root' '--password=' '--host=database' 
Execution failed: returned 1.

There are two possible fixes:

  1. Hard-code a dependency on MySQL 5.7:
  database:
    image: mysql:5.7
  1. Force MySQL 8.0 to use the older mysql_native_password authentication plugin:
  database:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password

I went with option #1 because the production site I'm trying to replicate is still on MySQL 5.7 and we have no plans to switch to 8.0 in the near future, so that made a lot more sense for me. But I'm not sure what would make the most sense for other consumers of this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant