> For the complete documentation index, see [llms.txt](https://docs.monolithforensics.com/monolith/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monolithforensics.com/monolith/monolith-features/on-premises-deployments/update-mysql-container.md).

# Update MySQL Container

When running MySQL in Docker or as a container, you may need to update the version of MySQL from time to time.

## Ex: Update from MySQL 8.0.16 to 8.0.31 -&#x20;

To update MySQL within Docker using Docker compose, you need to update your "docker-compose.yml" file.

## 1 - Edit "docker-compose.yml" file:

Find this line in the MySQL block:

<pre><code><strong>image: mysql:8.0.16
</strong></code></pre>

Update the MySQL version in this line to the next version:

```
image: mysql:8.0.31
```

This will tell Docker which version of MySQL to use when deploying Monolith.

## 2 - Redeploy Monolith

Redeploy Monolith using the standard Docker compose command syntax:

```
docker compose down
docker compose up -d
```

This will stop the current Monolith deployment and restart it fresh containers.  You should see the new version of MySQL download as a Docker image during this process.

Once redeployed, MySQL will go through a breif process of updating itself that may last a minute or two, so it may take a minute or two for Monolith to be available for use.

## Conclusion

After completing steps 1 and 2, you should have a new version of MySQL installed and deployed for use with your Monolith deployment.
