Having a data volume provides us data safety and flexibility to change the MySQL version, and it also protects data during a disaster. :rw has also been specified so as to provide both read and write access to this directory to container. So all the data of the MySQL tables and others are residing at /var/lib/mysql inside the container.We’re mapping this with our local directory. Now, let’s take a look at the second line of the volumes section: - "./data:/var/lib/mysql:rw" config directory: bind-address = 0.0.0.0 max_connections = 505 max_user_connections = 500 For now, I’ll have the following things on the my.conf file located in the. We can change the configuration of your MySWL container as you wish. config/my.conf will now be the active configuration file. The right-hand side of the semicolon has the default location of the configuration file, config-file.cnf, of the MySWL container - which we’re mapping with a local file specified on the left-hand side of the semicolon. "./config/my.conf:/etc/mysql/conf.d/config-file.cnf" To make this more clear, take the first line of the volumes section first. If you observe the volumes part of this file, we have a mapped local directory of our system that we created just now with the data directory and configuration file inside the container.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |