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

Pipeline failed when starting Tests with MySQL error, just started today

Drew Schulz April 20, 2018

I've been running pipelines for a couple of weeks with no issues, then today I get this error when my tests start:

+ python manage.py test
Creating test database for alias 'default'...
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection

self.connect()

File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 194, in connect

self.connection = self.get_new_connection(conn_params)

File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 236, in get_new_connection

return Database.connect(**conn_params)

File "/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py", line 86, in Connect

return Connection(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/MySQLdb/connections.py", line 204, in __init__

super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2059, "Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory")

The above exception was the direct cause of the following exception:

 my pipeline spec looks like this:

image: python:3.6.4

pipelines:
default:
- step:
script:
- echo "Placeholder..."
branches:
develop:
- step:
name: Deploy to Staging
caches:
- pip
deployment: staging
script:
- echo "Building out PIP installation..."
- pip install -r requirements.txt
- pip install awsebcli --upgrade
- echo "Develop branch testing run..."
- python manage.py test
- eb init <name> -r us-west-2 -p python-3.6
- eb deploy <name>
services:
- mysql
definitions:
services:
mysql:
image: mysql
environment:
MYSQL_DATABASE: 'casa'
MYSQL_ROOT_PASSWORD: 'let_me_in'

Nothing changed on the pipeline setup, but the MySQL connection seems to fail now 

2 answers

2 accepted

4 votes
Answer accepted
Mark Starkman April 20, 2018

Try changing your `mysql` definition to the following (add `:5.7`).

 

definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: 'casa'
MYSQL_ROOT_PASSWORD: 'let_me_in'
Drew Schulz April 20, 2018

Great!  Thanks for the help this worked!

3 votes
Answer accepted
Jason Gloudon April 20, 2018

We had to update our pipeline to use mysql 5.7 since the mysql docker image is now mysql 8, which is setup to require this client plugin.

mysql:
image: mysql:5.7

Drew Schulz April 20, 2018

Great!  Thanks for the help this worked!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events