Due to new hashing algorithms in mysql 8 I am unable to successfully run CI tests in gitlab against this mysql version.
I believe this applies to other CI engines also.
Let's assume my .gitlab-ci.yml
is as as simple as that:
build:
stage: build
image: chilio/laravel-dusk-ci:stable
services:
- mysql:8.0
script:
- cp .env.example .env
- composer install
- php artisan migrate
And this is the error I get:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
I've found different posts, about reconfiguring mysql instance, but this image is official mysql docker, and I believe it should work the same way, across different versions ...
Images from mysql:5.5 to 5.7 didn't introduce any problems, but with mysql:8.0 I get error as stated before...
So far I have not found any solution to get around this.
Any ideas?
You can install and run laravel without using docker environment, First of all you need to have composer installed on your operating system before you create a new laravel project locally.
Laravel Sail is a light-weight command-line interface for interacting with Laravel's default Docker development environment. Sail provides a great starting point for building a Laravel application using PHP, MySQL, and Redis without requiring prior Docker experience.
Finally I have managed it to work.
in this case, mysql service should be called differently:
services:
- name: mysql:latest
command: ["--default-authentication-plugin=mysql_native_password"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With