How to migrate MySQL data directory in docker container?

前端 未结 2 1978
独厮守ぢ
独厮守ぢ 2021-02-19 07:43

I have a docker container running MySQL-5.5 with host data volume. I am upgrading my container to MySQL-5.6. I am starting a new container with the same host volume. MySQL was c

2条回答
  •  梦谈多话
    2021-02-19 08:05

    I believe you need to modify your dockerfile to run mysql-upgrade before starting mysql. Although you might need to repair it as well as described in the references you provided. You should only need to run it once, then you can remove it from dockerfile. (I assume database is actually stored on the host file system and mounted in the docker.)

提交回复
热议问题