Neel
Neel

Reputation: 97

How to export MYSQL Database tables from one server to another

How do I export and import MYSQL database selected tables(not all) from one machine to another machine ?

cheers

Upvotes: 3

Views: 1682

Answers (2)

Jason S
Jason S

Reputation: 189786

I use the MySQL Administrator, it lets you do backups/exports interactively to a file (& restore from a file). From a command-line, what @Aif said. If you are worried about atomicity / consistent database state, LOCK TABLES first and then UNLOCK TABLES afterward.

Upvotes: 0

Aif
Aif

Reputation: 11220

mysqldump [options] db_name [tables] and then load them using mysql -u root -p < backup.sql

Or rsync /var/lib/mysql/ ...

Upvotes: 4

Related Questions