MySQL large capacity database backup method

MySQL large capacity database backup method

It can be used on VPS and virtual hosts that support SSH. It is convenient and fast. The command is as follows:

To export the database, you need to use the MySQL mysqldump tool. The basic usage is:
shell> mysqldump [OPTIONS] database [tables]
If you don't give any tables, the entire database will be exported.
1. Export the entire database
mysqldump -u username -p password database name> exported file name
/usr/local/mysql/bin/mysqldump -uroot -ppassword wordpress | gzip -9 –> wordpress_db.sql.gz
2. Export a table
mysqldump -u username -p password database name table name > exported file name
/usr/local/mysql/bin/mysqldump -uroot -ppassword wordpress wp_config> wordpress_wp_config.sql
3. Import the database using the source command to enter the MySQL database console. The command is
mysql -u username -p password
/usr/local/mysql/bin/mysql -uroot -ppassword
Select Database
mysql>use database and then use the source command, followed by the .sql file
mysql>source 123.sql
After the import is complete, use exit to exit the MySQL database console.

Reprinted from: http://www.zhukun.net/archives/4893

<<:  PPTPD one-click installation package

>>:  How to implement related logs in WordPress without using plugins

Recommend

VPS Master gives away 100 free vps on New Year's Day

www.saevps.com Go here to activate, discount code...

BudgetVM: $35/year/1 core/512MB memory/20GB space/2TB traffic/1 IP/Xen

BudgetVM is a sub-brand of Enzu. It has been intr...

Cents Web Hosting: $22/year/1GB RAM/40GB storage/500GB bandwidth/OpenVZ/USA

Cents Web Hosting, a Vietnamese hosting provider,...

3proxy: VPS establishes SSL proxy

3proxy is an anonymous proxy program that uses SS...

V.PS 2 cores 1GB memory 1Gbps port Japan KVM VPS review

Details : V.PS: €2.98/month/2 cores/1GB memory/20...

Coolhandle virtual host introduction

1. Introduction to coolhandle Cool Handle is an A...

Hostigger: $100/year/8GB RAM/100GB SSD space/10TB bandwidth/KVM/Türkiye/Chicago

Hostigger, an American hosting provider, was foun...

ZeptoVM: $40/month/2GB memory/24GB space/25TB traffic/300Mbps port/KVM/Bakhtar

ZeptoVM, a US hosting company in Wyoming (Filling...

PoundWeb: £4/month/1GB RAM/25GB SSD space/unlimited traffic/KVM/UK

PoundWeb, a UK hosting company, is a formally reg...

VPS Soldiers: $7/month/2GB RAM/40GB storage/3TB bandwidth/KVM/US

VPS Soldiers, a newly established US hosting comp...