I want help to replicate only couple tables between two nodes.

I am a beginner, I did not take any steps as of now.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


If you would like to export only two tables and import them to your second node you could use the mysqldump command, it would look something like this:

mysqldump -u root -p your_db_name_here  table1 table2 > your_db_name_tables1_2.sql

Then you could copy the .sql file over to your seconde node and import it:

To copy the file use:

scp your_db_name_tables1_2.sql root@your.second.node.ip:/root/

To import the file to your database on your second node, first ssh to the second node and run:

mysql -u root -p your_db_name < your_db_name_tables1_2.sql

If you are actually after MySQL replication setup, you can follow the steps here on how to set that all up:

Hope that this helps! Regards, Bobby