![]() ![]() I am creating below directory structure under the current directory. In any case docker container get terminated, you can relaunch container using the existing data files.Ĭreate a directory to keep your MySQL data files. But, If you like, you can keep database files on the host machine. We recommend to use data volume instead of putting files on host machine. Option 2 – Storing MySQL Data on Host Machine You can view the docker volumes by running commnad: docker volume ls Output: Creating network "db_default" with the default driverĬreating volume "db_dbdata" with default driver Next, run below command to launch Docker container. This is the default directory used by MySQL to store all data files. The above configuration defined one data volume named “dbdata”, which is attached to MySQL container and mounted on /var/lib/mysql directory. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |