The info is available everywhere but for those who want it spoon fed into their eager mouths here goes:

To dump a database to an optimized sql file and then tar/gz compress the file:

> mysqldump --opt database > database.sql
> tar -czvf database.tar.gz database.sql

To export a database from the local mysql server to a remote mysql server:

> mysqldump --opt -A | mysql --user=remote_user --password=remote_pw --host=xxx.xxx.xxx.xxx

You're welcome!

Related posts:

  1. Automated Backups – A 5 Minute Script To Safer Data
  2. Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)
  3. Ruby On Rails and SliceHost Part 1: Initial Setup
  4. Installing Ruby Enterprise Edition with Phusion Passenger
  5. Setup Python 2.5, mod_wsgi, and Django 1.0 on CentOS 5 (cPanel)