Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

How to dump mysql (one table) from one Server, to another server.

Here i will use Database as database and Table as table to dump
And, restore into Database, table name is not necessary to pass (infact should not pass), as dump has all required information.

#!/bin/bash

`rm -f /tmp/dumpedtable.sql`

mysqldump -u ashish.nepal -pMy_PASS Database Table -h xxx.ashishnepal.com > /tmp/dumpedtable.sql; sleep 30; mysql -uashish.nepal -pMy_thisPass Database -h yyy.ashishnepal.com < /tmp/dumpedtable.sql;

I am deleting, the sql if exists
Mysql dump from server one, xxx.ashishnepal.com
and restore to yyy.ashishnepal.com

####################################################

Simple mysql dump

Backup only one table.

mysqldump -u -p mydatabase table1 > table1.sql

To restore the backup you can use the following command:

mysql -u -p mydatabase < table1.sql