How to back up MYSQL database using dreamhost Space

Source: Internet
Author: User
How to back up MYSQL database using dreamhost Space

How to back up MYSQL database using dreamhost Space

How to back up and restore a MySQL database using SSH (Shell)
For example:
Database parameters ::
MySQL address: mysql.dh.net
MySQL name: mysql_dbname
MySQL user: mysql_dbuser
MySQL password: mysql_dbpass

I want to back up the database as bak. SQL

Steps:
Similarly, you can use telnet or download a putty from the windows system. After you log on to the server, cd all the way to the appropriate directory (confirm that the current directory is writable ).
Enter the following command:
Mysqldump-h mysql.dh.net-p mysql_dbname-u mysql_dbuser> bak. SQL
Then press enter, prompting you to enter the database login password. after entering the password, press Enter. OK! Back up the database to the current directory.

How to restore the bak. sqldatabase :::
Enter the following command and press Enter.
Mysql-h mysql.dh.net-p mysql_dbname-u mysql_dbuser
Prompt you to enter the password, enter the password, and then press ENTER
The MySQL operation prompt symbol is displayed.
Enter the following command
Source bak. SQL
Check the bak. SQL file before proceeding to the current directory.
Press enter. OK to restore ing .....

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.