1
Fork 0

Run mysql_upgrade in container

This commit is contained in:
Jake Howard 2022-02-07 19:14:27 +00:00
parent 53c54bc55f
commit c66ceec805
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -43,7 +43,7 @@ I love PostgreSQL, but MySQL definitely makes the upgrade process much simpler.
1. Stop the application (`docker-compose down`) 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`) 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`) 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`) 5. Once complete, stop the database container (`docker-compose down`)
6. Start everything again as normal (`docker-compose up -d`) 6. Start everything again as normal (`docker-compose up -d`)