Practical method for automatic MySQL database backup in Linux/usr/bin: mysql installation directory
Create a backup folder:
Mkdir mysql_data_bak
Create a script file:
Touch autobackupmysql. sh
Open a file
Vi autobackupmysql. sh
Add the following content to the script:
Tags: roo rom binary reconnect man bin command TOC endThe binary log binlog of the MySQL database records the full amount of DDL and DML operations on the database, which is an irreplaceable key to the point-to-point disaster recovery of the database. Therefore, based on such considerations, it is necessary to make app
With regard to the Mysql database BACKUP method, helper's editor summarizes all the current BACKUP methods, including mysqldump, mysqlhotcopy, backup table, SELECTOUTFILE, or binlog backup, or directly copy data files and related
; Test.dumpOnly the table structure will be backed up. --databases indicates the database to be backed up on the host. If you want to back up all the databases on a MySQL host, you can use the--all-databases option, as follows:Mysqldump--all-databases> Test.dumpE. Recovering a database from a backup fileMySQL [
It is important to back up your database if your database tables are missing or corrupted. If a system crash occurs, you will want to be able to recover as few data from your table as possible to the state at which the crash occurred. Sometimes it is the MySQL administrator who caused the damage. The administrator already knows that the table has been corrupted a
onlyMysqldump--no-data--databases mydatabase1 mydatabase2 mydatabase3 > Test.dumpOnly the table structure will be backed up. --databases indicates the database to be backed up on the host. If you want to back up all the databases on a MySQL host, you can use the--all-databases option, as follows:Mysqldump--all-databases> Test.dumpE. Recovering a database from a
mysql5.5How it works: It's actually the process of outputting data directly from the MySQL repository in a logical SQL statement or generating a backup file.Grammar:BackupMysqldump-u User name-p password database name, table name > Backup locationExample: Mysqldump-uroot-p ' 123456 ' Test>/opt/mysql_bak.sqlView: Egrep-
Xtrabackup is an open source software developed by Percona, which is an open source alternative to the InnoDB hot standby tool Ibbackup (paid commercial software). Xtrabackup consists of parts: Xtrabackup and Innobackupex, where xtrabackup tools are used to back up the InnoDB and XTRADB engine tables While the Innobackupex tool is used to back up the tables of the MyISAM and InnoDB engines, this article describes how to do full and incremental backups with the Innobackupex tool.First, installati
=*** and--password=*** must have a space in the middle,For example, complete backup completeFor example, a full backup creates a file named after a date (month, day, minutes, minutes, seconds, YYYY-MM-DD_HH-MM-SS)The fully backed up memory is actually a copy of the data file of the backed up database plus some information that is generated when the backupFor exam
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, the importance of data
The mysqldump client can be used to dump databases or collect databases for backup or transfer data to another SQL Server (not necessarily a MySQL Server ). Dump contains table Creation
The mysqldump client can be used to dump databases or collect databases for backup or transfer data to another SQL Server (not necessarily a
mysql| Backup | data | database
It is important to back up your database if your database tables are missing or corrupted. If a system crash occurs, you will want to be able to recover as few data from your table as possible to the state at which the crash occurred. Sometime
to connection-T, the number of threads used by--threads, default 4-C,--compress-protocol using the compression protocol on the MySQL connection-V,--version show the program version and exit-V,--verbose more output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2
Myloader:
Copy Code code as follows:
root@dd:~/mydumper-0.5.2#./myloader--help
Usage:
Myloader [OPTION ...] multi-threaded MySQ
Mysql versions later than 3.23.15 provide the database replication function. This feature allows you to synchronize two databases, master-slave mode, and mutual backup mode. The settings of the database synchronization replication function are reflected in the mysql settings
Method one, directly package MySQL database under the data directory in the database you want to back up the name of the directory, and then restore can be directly replaced
Method Two, using Xcopy timed backup, the following code
Save the. bat file with the following code
The code is as follows
Copy
It is important to back up your database if your database tables are missing or corrupted. If a system crash occurs, you will want to be able to recover as few data from your table as possible to the state at which the crash occurred. Sometimes it is the MySQL administrator who caused the damage. The administrator already knows that the table has been corrupted,
mysql| Backup | data | database
1 using mysqldump to back up and copy databases
When you use the Mysqldumo program to generate a database backup file, the file contents contain the Create statement that creates the table being dumped and the INSERT statement that contains t
Label:MySQL backup and restore is done using the mysqldump, MySQL, and source commands. Backup and restore of MySQL under 1.Linux 1.1 Backup [[email protected] ~]# cd/var/lib/mysql (go to MySQ
I. Master-slave SynchronizationRefer
Ii. Incremental Backup:Perform full backup at PM and PM every day, and back up binlog every one hour, that is, Incremental backup. The specific operations are as follows:Enable binlog in LinuxAdd the mysqld section in/etc/my. cnf:[Mysqld]Log-bin = ../logs/mysql-binMax-binlog-size = 50 MEnable binlog in windowsAdd the mysqld se
The following articles mainly introduce the basic knowledge of MySQL database backup. We all know that MySQL database is widely applied, so the practical application of MySQL database
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.