mysqldump backup and restore to remote server

前端 未结 6 699
清酒与你
清酒与你 2020-12-15 08:31

How can i use mysqldump to backup and restore database to a remote server?

Both have root access. I am using putty to perform this.

So far I tried the follo

6条回答
  •  温柔的废话
    2020-12-15 09:09

    [local-server]# mysqldump -u root -prootpswd db | mysql \
                     -u root -ptmppassword --host=remote-server -C db1
    

    [Note: There are two -- (hyphen) in front of host]

    Please note that you should first create the db1 database on the remote-server before executing the following command.

提交回复
热议问题