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

Zoom Active – US Host Introduction and Coupon Code

1. Zoom Active Introduction In 2008, the hosting ...

2010 New Version DreamHost Purchase Tutorial

Today, I will use an article to introduce the Dre...

SSH wall-breaking tool Bitvise Tunnelier detailed introduction

About Bitvise Tunnelier Official download address...

midPhase Virtual Host Introduction

midPhase has a good reputation and low prices. Th...

VPS collection and recommendation with 200GB space and 20 USD per year

The price is kept at US$20 per year or no more th...

1and1.com domain only $0.99

1and1.com official website launches $0.99 domain ...

WattaServer: $35/month/8GB memory/250GB hard drive/5TB traffic/4 IP/Seattle

WattaServer is owned by ONeil Online, which was f...

Bacloud: $23.1/month/4GB RAM/2TB hard drive/unlimited traffic/1 IP/New York

Bacloud, a Lithuanian hosting company founded in ...