You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because this image is based on Alpine, when asked to install MySQL client it actually installs MariaDB's instead. This is often a reasonable substitution, but here it's fatal.
The problem is that Laravel 8's schema dump restore process (which makes CI pipelines run so much faster) builds a command line for the mysql CLI client and uses it to import the schema. MariaDB's CLI client is incompatible with MySQL 8.0 due to lack of support for its default auth mechanism, caching_sha2_password, so unless you also want to have to reconfigure your MySQL server (meaning you can't simply enable it using services: mysql:8.0 in your CI config) you have to disable schema dump and have your tests run slowly.
The command"mysql --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --database="${:LARAVEL_LOAD_DATABASE}" < "${:LARAVEL_LOAD_PATH}"" failed.
Exit Code: 1(General error)
Working directory: /builds/myapp
Output:
================
Error Output:
================
ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
It's only the MaraDB client that's the problem. This is tricky to fix for Alpine Linux because it does not have a real MySQL package, even though MySQL includes support for Alpine.
I've been looking through various Laravel/PHP focused images for CI, and nearly all seem to suffer this problem, so I'm hoping one will fix it!
The text was updated successfully, but these errors were encountered:
I'm tempting to support another distribution but I love that this repo is a simple and lightweight DockerFile with the bare minimum for Laravel apps so Alpine feels like the ideal distribution to me.
I'll keep this open until — fingers crossed — a proper MySQL client becomes available for Alpine.
Thanks. I have found a workaround, but it involves downgrading the security of the mysql client connection, so it's not ideal. Add this command arg to the mysql service in your gitlab-ci.yml file:
Because this image is based on Alpine, when asked to install MySQL client it actually installs MariaDB's instead. This is often a reasonable substitution, but here it's fatal.
The problem is that Laravel 8's schema dump restore process (which makes CI pipelines run so much faster) builds a command line for the
mysql
CLI client and uses it to import the schema. MariaDB's CLI client is incompatible with MySQL 8.0 due to lack of support for its default auth mechanism,caching_sha2_password
, so unless you also want to have to reconfigure your MySQL server (meaning you can't simply enable it usingservices: mysql:8.0
in your CI config) you have to disable schema dump and have your tests run slowly.It's only the MaraDB client that's the problem. This is tricky to fix for Alpine Linux because it does not have a real MySQL package, even though MySQL includes support for Alpine.
I've been looking through various Laravel/PHP focused images for CI, and nearly all seem to suffer this problem, so I'm hoping one will fix it!
The text was updated successfully, but these errors were encountered: