I am unable to connect to mysql running in service container, it's throwing the folllowing error
+ mysql -uroot -ptest_user_password -h127.0.0.1 -e 'SHOW DATABASES;'
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
I even set the MYSQL_DEFAULT_AUTH to mysql_native_password
Edit: I wanted to use mysql 8 and not 5.7 or earlier version
below is by pipeline config
# Template NodeJS build
# This template allows you to validate your NodeJS code.
# The workflow allows running tests and code linting on the default branch.
name: Build and Test
- apt-get update -y
- apt-get install -y mysql-client
- mysql -uroot -ptest_user_password -h127.0.0.1 -e 'SHOW DATABASES;'
Hi @Balakrishnan S
Thank you for reaching out to the community.
I've tested the Docker image mysql:8.0.22 as a service on my Pipelines build as well.
However, I'm getting the same error.
I went ahead and searched the error message online.
It appears that Mysql 8 version is now using caching_sha2_password as the default authentication plugin instead of the native one which is mysql_native_password. More info here
For this, to enforce the native authentication for Mysql 8 version, the best I can suggest is for you to create your own Docker image with the Mysql version 8 and by enforcing the authentication plugin mysql_native_password.
You can upload that in Docker Hub as well and use it as a Docker service for your Pipelines build.
You can also use this sample Dockerfile to build your own Docker image.
Hope it helps and let me if you have further questions that I can help with.
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events