tighten / takeout

Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
MIT License
1.59k stars 83 forks source link

Docker image difference between mysql/mysql-server and mysql #266

Closed delfz closed 2 years ago

delfz commented 2 years ago

Hi, I've just recently upgraded my takeout instance to v.1.8.12 and noticed that the MySQL service changed from using mysql to mysql/mysql-server because my volume that was create from the mysql won't work with the mysql/mysql-server. Because of this I'm forced to stick with v1.8.11. And as per searching the two are indeed different.

Maybe we can separate the two? Like retain the mysql as MySQL and the new mysql/mysql-server as MySQL Oracle Maintained?

markwalet commented 2 years ago

From what I've seen, the main difference would be the base image it is based on (source)

So the base image went from Oracle to Debian. I'm not an expert in this kind of stuff, but I would prefer the Debian version after a small amount of research.

Is this something that is required for you on local development? I can't think of a reason why it really should.

I'm not trying to dismiss your issue. Just thinking out loud, to see if we can work around it :)

josecanhelp commented 2 years ago

Hey @delfzzz,

I think maintaining 2 different versions of mysql would be confusing to users.

If I'm understanding your situation correctly, you have a docker volume that is storing data that is compatible with a mysql container that is no longer enabled by the latest version of Takeout.

A solution that I would recommend would be to move that data over to a volume that is compatible with the mysql containers that Takeout is enabling with the latest version. The steps would look like this

Assumptions:

Steps:

  1. Enable a mysql container using v1.8.11 of Takeout and use port 3307 - attach the volume mysql_data
  2. Update Takeout to the latest version. The mysql container will be unaffected
  3. Enable a new mysql container - set it to use port 3306, set the volume to mysql_data_new (or anything you'd like to call it)
  4. Export the data from the container attached to port 3307 (the old container) to a dump file on your host computer.
  5. Import the data from the dump file into the container attached to port 3306 (the new container)
  6. Disable the old mysql container using Takeout
  7. Remove the old mysql_data volume by running docker volume rm mysql_data

At this point you would have Takeout updated and your new docker volume mysql_data_new will be compatible with new containers enabled by Takeout.

delfz commented 2 years ago

@josecanhelp yep, dumping and migrating is an option as you've mentioned :)

Just a question, is there no difference in terms of compatibility between the two mysql feature/data handling wise? (minus the incompatibility between volumes in docker)