Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

mysql 8.0 fails on pipelines

Julius Šmatavičius February 7, 2019

I have problem with pipelines and mysql 8

I have mysql service in my pipelines:

definitions:
services:
mysql:
image: mysql:8.0.4 #loselesslive/mysql8, jasonmu/mysql-native-password
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci','--default-authentication-plugin=mysql_native_password', 'sed -i '/^\[mysqld\]$/a\default-authentication-plugin=mysql_native_password' /etc/my.cnf']
restart: always
ports:
- "3306:3306"
environment:
TZ: Europe/Vilnius
MYSQL_DEFAULT_AUTH: 'mysql_native_password'
MYSQL_DATABASE: 'homestead'
MYSQL_ROOT_PASSWORD: 'secret'
MYSQL_USER: 'homestead'
MYSQL_PASSWORD: 'secret'

when i run pipeline i got error "Connect Error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client" like in

https://stackoverflow.com/questions/52364415/the-server-requested-authentication-method-unknown-to-the-client-php
https://github.com/laradock/laradock/issues/1390
https://github.com/laradock/laradock/issues/1392

 

if i could run script to run sql and command line i can fix it but  how?

 

1 answer

0 votes
Julius Šmatavičius February 11, 2019

i rewrite mysql docker with mine  and it works like default

https://hub.docker.com/r/bondas83/mysql-native-password

Massimiliano Arione May 31, 2019

Hi,

I tried to use your docker image in my bitbucket pipeline configuration.

It looks like the setup it's working, mysql server is up. But as soon as application tries to connect, I get the following error:

  An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory                                                                       

 

Any idea?

Alex Bergin July 3, 2019

Can confirm @Julius Šmatavičiuscustome mysql 8 container is working for me. Thanks!

Be good if Atlassian had a native fix for this.

Julius Šmatavičius July 4, 2019

yes, it works

i use such config

definitions:
services:
mysql:
image: bondas83/mysql-native-password
environment:
MYSQL_DATABASE: 'testing'
MYSQL_ROOT_PASSWORD: 'secret'
MYSQL_USER: 'homestead'
MYSQL_PASSWORD: 'secret'
Like Felipe Luiz Carnevali likes this
Shane Niebergall November 20, 2019

Thank you Julius, after hours of searching many forums, yours is the only one working for me.

ibushong March 29, 2020

This should be fixed so that we don't have to use a custom container. I'm very surprised more people aren't complaining about this. Is no one using MySQL v8?

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events