![]() Here's my script for building my docker containers: clone via sh script to trigger rsync from AppDBLive.read +-+ - Can Write and mess with all the data for testing/dev +-+ - Docker Container: AppDBLive.readwrite | - Consistently cloning from prod slave/master +-+ - READ Only (If I want to test live data) +-+ - Docker Container: AppDBLive.readonly what I did is to create 2 docker container running mysql, 1 as slave of my production's slave, and one for direct replicating via docker mapping files. I guess it would only work on the same database name. tried to set auto_recover table, but no luck. turns out, it appears to be corrupted when starting the mysql. I find mysqldump | mysql method too slow for cloning 6GB database even on the same machine/mysql-server, so I tried copying entire datadir folder of the db and attempted to paste it on a different folder (same instance) for other db where I can mess with it. If so, it seems moving files are much faster then using mysqldump to copy databases(or to importing data from one DB to another DB in MySQL). Then dump the db_test_1 database back into the new database db_test_2? If I create a new directory under path /var/lib/mysql/ say db_test_2, and copy every file from db_test_1 directory to db_test_2, will it also create a new database db_test_2 which has exactly the same contents(tables) as db_test_1's ?ĭoes this physically database files moving action create the same result as following command-line actions: ![]() MYI files group mapped with one table in the database. MYI like following: /var/lib/mysql/db_test# ls My database named db_test, I notice that under path /var/lib/mysql/db_test ,there are files suffix with. I am using MySQL database and using an Ubuntu Linux machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |