Backing up data tables with mysqldump

Source: Internet
Author: User

Mysqldump-H the.***.139.** -U k**Eb-P K**Eb> /Www/Test/ .- --Geneva. sql; Enter Password://Enter your password to note:1. mysqldump is  notA MySQL command, it isA command line utility. You must call it fromyour shell command line. Mysqldump is not a MySQL command, it is a command lines utility. You must invoke it from your shell command line. 2only when the data volume is small, when the big time need to write timed script run code backup3.-Uroot-Ppassword-U-p should be stuck with the username and password, there is no space between, so the recommended practice is not to enter the password4MySQL database password must not be empty, if the password is empty, then mysqldump can not be used

This can also be done with PHP code, only when the amount of data is small

<?Phpdate_default_timezone_set (' PRC ');$dbhost= ' 192.168.6.13:3036 ';$dbuser= ' Hanks ';$dbpass= ' 4763437 ';$dbname= ' Ksweb ';$date=Date("y-m-d");//Test//$command = "mysqldump--opt-h $dbhost-u $dbuser-P $dbpass $dbname | gzip > $backupFile ";$command= "Mysqldump-h 192.168.6.13-u hanks-p4763437 ksweb > '$date'. SQL ';system($command);Echo"Success";

Backing up data tables with mysqldump

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.