Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Search
Editing
Backing up MySQL Database Hosted in Docker Container
(section)
From KB42
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
Edit source
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Introduction== In posting [Creating MySQL Image with Docker File](https://jojozhuang.github.io/architecture/creating-mysql-image-with-docker-file/), we created MySQL image `jojozhuang/jspmysql` with Dockerfile, and used this image to run MySQL container. The issue is MySQL image doesn’t persist data. Initially, in this MySQL container, there are three rows in table `Product`. If you make some changes(eg. add new product), and create new image based on this container, these changes won’t be restored to the new image, they are lost. So each time before creating a new image for MySQL container, we need to backup the database first.
Summary:
Please note that all contributions to KB42 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
KB42:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
DONATE
Wiki tools
Wiki tools
Special Pages
Categories
Import Pages
Cargo data
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs