Dumping the entire mysql database, Dumping the – HP 3PAR System Reporter Software User Manual

Page 232

Advertising
background image

Dumping the Entire MySQL Database

To create a dump of a MySQL database use the mysqldump program as follows

# mysqldump --host=hostname --user=username --password=passwd --opt dbname > dbname.sql

This creates a text file called dbname.sql that contains SQL commands to create the tables and
insert the data into the tables. You can simply source this file into MySQL to recreate the entire
database.

NOTE:

When dumping data from a large database that is to be backed up to a different location

than the source, it is best to use sysbck as the data will be stored in multiple 2 GB files (if
necessary), and is easier to manage.

232 Troubleshooting System Reporter

Advertising