Database Backup is the key to protecting the normal operation of the database. The following articles mainly describe some tips for MySQL database backup, we all know that the permissions required by users who use
This article describes how to backup and restore the MySQL database under Linux.
Database backup is very important. If you do a regular backup, you can restore the data to the last normal state in the event of a system crash, min
Python + crontab for automatic MySQL database backup [Copy link]
Direct elevator1#Posted on 23:10:10| View only the author | view in reverse order
A long time ago, in order to realize automatic backup of MySQL databas
;Advantages:Short recovery timesLow maintenance costsDisadvantages:Occupy more spaceConsumes more system resourcesFrequent lock tables affect user experienceAccording to the comprehensive preparation650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/86/3D/wKiom1e5wCWiYz9AAAGd4gH3Kd0666.png-wh_500x0-wm_3 -wmp_4-s_3232461653.png "title=" Mysql2.png "style=" Float:none; "alt=" wkiom1e5wcwiyz9aaagd4gh3kd0666.png-wh_50 "/ >Advantages:Less space occupiedConsumes less system resourcesThe number
Brief introduction:The mysqldump command allows you to export all of the specified libraries and tables as SQL scripts, which can be used on different sections of MySQL. For example, to upgrade a MySQL database you can use mysqldump to back up all the databases and then import them directly into the upgraded MySQL data
MySQL database backup and restore common commands are the key to the MySQL database backup and restore, no commands, nothing to do, not to mention what backup restore, only to the syste
MySQL database backup
If you store any database in MySQL, you do not want to lose, you should do weekly or even daily backups. Depending on the database you are using-whether it is storing forum information, employee information,
First: New batch file Backup.dat, which enters the following code:
The code is as follows
Copy Code
net stop MySQLxcopy "C:/Program files/mysql/mysql Server 5.0/data/piaoyi/*.*" d:/db_backup/%date:~0,10%//ynet start MySQL
Note: If there are spaces in the path in the batch command, you must enclose the path with double quotes
The following describes three backup methods for database backup and recovery:
Each database and data table in MySQL correspond to the directory in the file system and the files under it.In Linux, the directory where database fil
backing up the database1. Use the mysqldump command to back up
Back up a database: Mysqldump-u user name-p password database name [table name 1, table Name 2 ...] > backup file path and name. sql
If there is no table name, back up the entire database eg:mysql-u root-p test Studentinfo >d:\test.sql
I would like to summarize some of the mysql database backup and recovery commands and methods commonly used on the network. If you need to learn how to back up the mysql database, please refer to them for details.
Method 1: directly package the directory of the name of the
We use the automatic batch processing program to back up the data. It can generate a backup file on a given day and save the data on a daily basis to a corresponding directory, it should be implemented in combination with windows scheduled tasks.
Method 1
CodeBackup
The Code is as follows:
Copy code
@ Echo off setlocal ENABLEEXTENSIONS: ---------- Configuration item ----------: Path where the
tools
Back up the database:
Mysqldump–user=root–password=root password –lock-all-tables database name > backup file. sql
To recover a database:
Mysql-u root–password=root Password Database name
(3) using
Tags: creating regular users and authorizing common SQL statements MySQL database backup and recoveryFirst, create a regular user and authorize 1, create a user and authorize[Email protected] ~]# mysql-uroot-pEnter Password:Welcome to the MySQL Monitor. Commands End With; or
MySQL Tutorial two server database tutorial implement synchronous Data backup method
1. Server StatusServer a:192.168.1.1Server b:192.168.1.2
2. Create a synchronization userHost Domain a:192.168.1.2 username a:sync_a password a:aaaHost Domain b:192.168.1.1 username b:sync_b password b:bbbAssign at least the following permissions grant replication slave
3. Imp
A Linux server scheduled backup
The first step is to create a new *.sh file.
New in Home directory
autobackupmysql.sh
#!/bin/sh# File:/home/mysql/backup.sh# Database InfoDb_name= "Test"Db_user= "Root"db_pass= "Root"# others VARsBin_dir= "/alidata/server/mysql/bin" #这里是mysql
Tags: mysqldump database backup lock tables MySQL mysqlhotcopyData backup is a very important task for database administrators. system crashes, disk corruption, and so on can lead to data loss, so you need to back up the 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.