mysqldump备份并还原到远程服务器 [英] mysqldump backup and restore to remote server

查看:770
本文介绍了mysqldump备份并还原到远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用mysqldump备份数据库并将其还原到远程服务器?

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

两者都具有root访问权限.我正在用腻子来执行此操作.

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

到目前为止,我尝试了以下操作:

So far I tried the following:

mysqldump -u root -p >z*x311a!@ masdagn_joom15 | mysql \ -u root -p g2154hE6-AsXP --host=207.210.71.26 -C masdagn_joom15temp \g

但它拒绝了

本地密码为:> z * x311a!@

the local password is: >z*x311a!@

远程密码为:g2154hE6-AsXP

the remote password is: g2154hE6-AsXP

推荐答案

This link provides information on backing up and restoring with mysqldump. It also gives some examples with a remote server.

该链接中的重要命令是:

The important commands from that link being:

备份:

mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql

还原:

mysql -u root -p[root_password] [database_name] < dumpfilename.sql

这篇关于mysqldump备份并还原到远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆