Update MYSQL database in Docker

docker run --rm -ti -v <full patch to db-files>:/var/lib/mysql mysql:5.7 bash

You’ll see a command prompt inside the MySQL container. Run the following command:

mysqld_safe --skip-grant-tables &

MySQL will start up. Wait 10 seconds or so for that to happen, and then run the following. Note you won’t see a command prompt, so just type away and it will work!

mysql_upgrade

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *