Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
Recently bought BH host space, one months to use a pretty handy, but has been stranded in the unknown how to efficiently backup the database and restore operations, and inadvertently see BH support SSH, contact customer service, upload ID card opened SSH (how to open the text in this article). Next, let's explain how the Bluehost host backs up and restores the database via SSH.
Back up the database:
1, the use of Putty login ssh, enter the host user name and password
2, display login success information, said already logged in
3, use the command "CD public_html" into the public_html directory, because we want to put the database backup files under this directory (you need to put the database backup files under which directory, you must first enter this directory)
4, Input BACKUP DATABASE command: Mysqldump-u database username-p Database password database name > database backup filename. SQL (do not use Chinese)
Hit Enter, wait a moment, if there is no error prompted that the database has been backed up successfully.
Restore Database
Preparation: Before restoring the database, first create database, database user, bind database user to database
1, enter the directory where you store the database files, enter the command: Mysql-u database username-p Database Password database name < database backup file. sql
2, knock return, wait a moment, if there is no hint of information, congratulations, the database has been imported successfully
This article by http://www.xiaocaocn.com Original, reprint please specify