Using DreamHost space to implement Mysql database backup method _mysql

Source: Internet
Author: User
How to use SSH (Shell) to back up and restore the MySQL database
For example:
The database parameters are::
MySQL Address: mysql.dh.net
MySQL Name: mysql_dbname
MySQL User: Mysql_dbuser
MySQL Password: mysql_dbpass

I'm going to backup the database to Bak.sql.

Steps:
Also, use the Windows system yourself with telnet or go to download a putty, after landing, all the way to the CD to find the appropriate directory (confirm the current directory can write).
Enter the following command:
Mysqldump-h mysql.dh.net-p mysql_dbname-u Mysql_dbuser >bak.sql
Then enter, prompts you to input the database login password, after entering the password, returns, ok! Just backup the database to the current directory.

How to recover a Bak.sql database:::
Enter the following command and return
Mysql-h mysql.dh.net-p mysql_dbname-u Mysql_dbuser
Prompts you to enter the password, enters the password and then returns
The MySQL action prompt symbol appears
Then enter the following command
SOURCE Bak.sql
Please confirm bak.sql this file again under current directory
Enter. OK, resume ing ....
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.