• 1 
预览模式: 普通 | 列表

每天自动备份MYSQL数据库(dh空间)

Getting a Backup From the ShellYou can use the mysqldump shell command to make a backup, also. This is more difficult to do the first time than the phpMyAdmin method above, but you can automate it so that the system backs up your database for you. See Automatic Backup for instructions on how to automate this.

  1. Log into your old server with SSH or Telnet
  2. Type the following command:

mysqldump –opt -uusername -ppass

[阅读全文]

标签: MYSQL dh

dreamhost(DH)空间MYSQL数据库备份方法

如何利用SSH(Shell)来备份和恢复MySQL数据库的方法
例如:
数据库参数为::
MySQL地址:mysql.dh.net
MySQL名称:mysql_dbname
MySQL用户:mysql_dbuser
MySQL密码:mysql_dbpass

我要把数据库备份为bak.sql

步骤:
同样,使用windows系统自己带的telnet或者去下载一个putty来,登陆以后,一路cd到自己觉得合适的目录下(确认当前目录可写).
输入下面的命令:
mysqldump -h mysql.dh.net -p mysql_dbname -u mysql_dbuser >bak.sql
然后回车,提示你输入数据库登陆密码,输入完密码后回车,OK! 就把数据库备份到当前目录下了

如何恢复bak.sql数据库:::
输入下面命令后回车
mysql -h mysql.dh.net -p mysql_dbname -u mysql_dbu

[阅读全文]

标签: dh mysql
  • 1