Tags: data sheet ffffff Virtual database important picture databases IMG procDescription:In a production environment, the security of data is critical, and any loss of data can have serious consequences. Therefore, it is important to back up data and restore data. Here are some things to do with backup and restore of data. ..Lab Environment: A CENTOS7 virtual mac
follows:Fifth step: Back up the database file, click "Right button", "Dump SQL file" on the connected database. Such as:Sixth step: Select the path to save the backup file and the name you want to save. Such as:Seventh step: Wait for the show dump progress is 100% Click Close (Recommended: Do a regular database backup). Such as:Next is the navicat Restore Databa
MySQL data backup and recovery we can use MYQL's own tools mysqldump, MySQL to achieve.
MYSQLDUMP supports remote single table backups, single database backups, and all database backups.
= = Backup = =
Note the space, additional parameters please add yourself. If-h-u-p, remote b
session (dump) does not see data that has been submitted by other sessions. REM all-databases: All databases REM %date:~,4%%date:~5,2%%date:~8,2% date of day @echo on Data restore: @echo off Set "ymd=%date:~,4%%date:~5,2%%date:~8,2%" "C:\Program files\mysql\mysql Server 5.6\bin\mysql"-utest1-p123456-h192.168.28.1--de
commands to back up the MySQL database Mysqldump-hhostname-uusername-ppassword databasename > Backupfile.sql backing up the MySQL database to a format with a delete table Backing up the MySQL database is a format with a delete table that allows the backup to overwrite the existing database without having to manually
MySQL Database backup
Use the mysqldump command to back up:Command line:
>--Use the root user to back up the person table under the test database;
Copy the entire database directory directly:Copy the database files from MySQL directly. This is the simplest and fastest method.
Quick Backup using the
Tags: mysqld put directory mysqldump div mil AMR Easy ADLMySQL backup restore simple test example Note: For convenience, hard-coding the database name, user name, password, backup file name, location, and restored file name, location In practice, it is recommended to write to the configuration file, the following is the test sample code
-datetime= "2017/07/12 00:00:00"--stop-datetime= "2017/07/13 00:00:00": The time range for this query is 7/12 00:00:00-7/12 24:59:59Third, data backupThe data backup is actually using the tools provided by MSYQL Mysqldump to back up the data to the specified file in the specified directory. 1. Back up the specified database or some tables in the database mysqldump "option" db_name "Table_names" 2. Back up one or more databases specified mysqldump "opt
This article describes all the common MySQL commands some data import Export command, as long as we hold these commands can be a quick way to backup our database restore the
MySQL data to import export 500MB data
Problem: 500M of the library table data needs to be imported into the new database.
First access to
Tags: mysql mysqldump backup restoreFor example, I have a discuz forum website with a database named Discuzmysql> show databases;+--------------------+| Database |+--------------------+| Information_schema || Discuz || MySQL || Test |+--------------------+4 rows in Set (0.00 sec)mysql> use Discuz;Reading table informat
Tags: row data crash Tool script data backup restore tab min commandMYSQLL provides a mysqldump command that we can use to back up data.Follow the prompts to enter the password, this will be the ABC database all the table structure and data back to Abc_20161108.sql,# mysqldump-u ROOT-P ABC > Abc_20161108.sqlBecause you want to always do backup work, if the data v
In the process of building a Web site often encountered file backup and restore, in case of the next useBackup:In the picture, the Blue line is the backup command, and WordPress is the name of the database to be backed up. ">" outputs the results to a file,/opt/wordpress.sql to back up the database to opt and named Wordpress.sqlRestores:Upload the file
Let's begin by telling you how to use mysqldump backup
SQL to back up the MyISAM table:
The code is as follows
Copy Code
/usr/local/mysql/bin/mysqldump-uyejr-pyejr--default-character-set=utf8--opt--extended-insert=false--triggers-r--hex-blob-x db_name > Db_name.sql
Use the following SQL to back up the Innodb table:
The code is as follows
Copy Code
Tags: space. SQL Fan database Basic restore using span cannotFirst, backup1. Back up a database-U username-p dbname table1 table2 ... > backupname.sqlExample:Mysqldump-u root-p owncloud > Owncloud.sql Where: The dbname parameter represents the name of the database, the Table1 and table2 parameters represent the name of the table that needs to be backed up, the entire database is empty, and the Backupname.sql parameter table designs The name of the
suffix called SQL;
Use the root user to back up the person table under the test database Mysqldump-u root-p Test Person > D:\backup.sql 2. Backing up multiple databases Grammar: Mysqldump-u username-p--databases dbname2 dbname2 > Backup.sql The--databases option is added, followed by multiple databases Mysqldump-u root-p--databases Test mysql > D:\backup.sql 3. Back up all databases The syntax for backing up all databases with the mysqldump com
terminated by ', ' optionally enclosed by ' ";MYSQLDUMP-UROOT-PAIXOCM-T/tmp SX T1--fields-terminated-by ","--fields-optionally-enclosed-by "" 'Import (table to exist)Load dataMysql>load data infile '/tmp/t1.txt ' into table ds.t1 fields terminated by ', ' enclosed by ' ";Finally add ignore 3 lines; Not the first 3 linesLast Add (ID, addr, name); Order of columnsMysqlimportMysqlimport-uroot--socket=/var/run/mysqld/mysql5.socket ds/tmp/t1.txt--fields-terminated-by ","-- Fields-optionally-enclosed
Tags: enter password class pre nbsp mil database MySQL database get Linu1. Backup① can be directly into the backstage. (default directory for MySQL:/var/lib/mysql)
② input command:
[[email protected] mysql]# mysqldump-u root-p test>/home/bak/2015-09-10/test.sql
Enter pass
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.