Solution Docker MySQL Latest Tag Push Breaks Application

Solution Docker MySQL Latest Tag Push Breaks Application

Solution Docker MySQL Latest Tag Push Breaks Application

Shortly after discovering that mysql released a new push to the latest tag I proceeded to pull down the updates and deploy an application that was using the mysql:latest image. 

I soon realized that I was no longer able to make a connection to the container from one of the docker-compose services that previously made connections to the container.

After investigating and searching for an issue on Github I soon discovered that others were experiencing this problem as well. 

https://github.com/docker-library/mysql/issues/409

I was able to recover my data and deploy the docker-compose stack by following these steps.


Solution
 

Note this works if you've mounted the volume of your mysql data

  1. docker exec into the container while it's running on mysql 8
  2. mysqldump the database to a file within the mounted directory
  3. exit the container and navigate to the directory where you've mounted on the host machine
  4. copy the file from mounted directory out of the mounted directory
  5. blitz / rm the mounted directory
  6. update docker-compose to use mysql:5.7
  7. docker-compose up and force recreate the container (it will recreate the mounted directory)
  8. after the mounted directory is created **copy** don't move but copy the .sql file back into the mounted directory
  9. docker exec into the mysql container and mysql restore the .sql file to the corresponding database
  10. exit the contaier
  11. never use mysql:latest tag again

Commands
mysqldump -u [uname] -p[pass] db_name > db_backup.sql
mysql -u username -p database_name < file.sql

Highlights
The Importance of Data Granularity

The Importance of Data Granularity

Data granularity is extremely important when doing data analysis or data engineering. In this article I discuss the importance of data granularity when completing a data analysis task.

What Does Walmart Do With Shrink Reports?

What Does Walmart Do With Shrink Reports?

I worked for Walmart many years ago as an Asset Protection Manager for 4 years. During that time we were required to file daily, weekly, monthly, quarterly and annual reports for store theft, shrink and accounting loss. What does Walmart do with those reports. 

Muracon 2017 - Using Vue.js in a Mura Application

Muracon 2017 - Using Vue.js in a Mura Application

Muracon 2017 is here and I am very excited. Ever since Blueriver announced and released Mura 7 , Mura keeps getting better. This year at Muracon '17 I will be giving a presentation on how to use Vue.js within a Mura application.