- set up ssh keys so server1 user can ssh to a server2
- set $HOME/.my.cnf so both users can get into respective mysql cli without passwords
- see below for sample file
- create the new, empty database on server2, receiving server
- from server1
- mysqldump mydatabase | ssh server2 mysql mydatabase
# $HOME/.my.cnf
[client]
password=myusersmysqlpassword
No comments:
Post a Comment
Note: only a member of this blog may post a comment.