S
S
strelkovandreyv2019-11-15 13:16:58
MySQL
strelkovandreyv, 2019-11-15 13:16:58

How can bash copy the contents of a MySQL database table between two servers?

Good afternoon, tell me please, is it possible to take the contents of one table (row) with a bash script and copy them to an identical table on another database server, having previously cleared it.
I need to carry out such a migration daily by cron

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman MySQL, 2019-11-15
@strelkovandreyv

mysqldump -h host1 <google.it> > file.sql
mysql -h host2 <google.it> < file.sql

if suddenly the replica does not fit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question