In real life, backing up the database on a regular basis is an extremely important task. When we use MySQL, there is a lot of choice in database backup, and this article will show readers how to use MySQL's mysqldump to back up the database.
First,
How to perform tasks regularly under LinuxIn Linux you should first enter CRONTAB-E, then there will be a VI editing interface, and then enter 0 3 * * 1/clearigame2 content into the inside: Wq save exit.In Linux, the tasks performed by the cycle are
1. Various usage instructions
A. The simplest use:
Copy Code code as follows:
Mysqldump-uroot-ppassword [Database name]
> [Dump file]
The above command backs up the specified database to a dump file (dump file), for
Today, MySQL backup crontab automatically run when the alarm appears, the contents of the alarm are as followsMysqldump:error 2013:lost connection to MySQL server during query when dumping table ' File_storage ' at Row:29mysqldump: Couldn ' t
In real life, backing up the database on a regular basis is an extremely important task. When we use MySQL, there is a lot of choice in database backup, and this article will show readers how to use MySQL's mysqldump to back up the database.
First,
How to perform tasks regularly under LinuxIn Linux you should first enter CRONTAB-E, then there will be a VI editing interface, and then enter 0 3 * * 1/clearigame2 content into the inside: Wq save exit.In Linux, the tasks performed by the cycle are
In the daily operations, the backup of MySQL database is extremely important, in case the database table is lost or corrupted, can recover the data in time.On-line Database backup scenario:Perform a full backup every Sunday, and then perform a
MySQL mysqldump data backup and mysqlmysqldump1. mysqldump command tool description
Parameter annotation: mysqldump adopts an SQL-level backup mechanism. It imports data tables into SQL script files and is suitable for upgrading between different
In Linux you should first enter CRONTAB-E, then there will be a VI editing interface, and then enter 0 3 * * 1/clearigame2 content into the inside: Wq save exit.In Linux, the tasks performed by the cycle are typically handled by the cron Daemon
MySQL backup -- mysqldump, mysql -- mysqldump
Back up MySQL directly by using the mysqldump command to back up it to the SQL format. The simplest command is:
mysqldump databasename > bak.sql
The generated bak. SQL content format is as follows:
--
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.