From c66ceec8056fc599bdb14563fb8210d62ca3ba72 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 7 Feb 2022 19:14:27 +0000 Subject: [PATCH] Run mysql_upgrade in container --- content/posts/upgrading-docker-databases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/posts/upgrading-docker-databases.md b/content/posts/upgrading-docker-databases.md index f78c8d1..a2c5e14 100644 --- a/content/posts/upgrading-docker-databases.md +++ b/content/posts/upgrading-docker-databases.md @@ -43,7 +43,7 @@ I love PostgreSQL, but MySQL definitely makes the upgrade process much simpler. 1. Stop the application (`docker-compose down`) 2. Update the tag you are using, and pull the new container (`mariadb:10.5` → `mariadb:10.7`) 3. Start just the database (which should now be the new version) (`docker-compose up -d mariadb`) -4. Run `mysql_upgrade`, likely using the `-u` and `-p` flags to specify credentials (`mysql_upgrade -uroot -p`) +4. Run `mysql_upgrade`, likely using the `-u` and `-p` flags to specify credentials (`docker-compose exec mariadb mysql_upgrade -uroot -p`) 5. Once complete, stop the database container (`docker-compose down`) 6. Start everything again as normal (`docker-compose up -d`)