Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I export table "practices" from db1 into db2? How do I do all tables from db1 into db2?

With Mysql, fill in the blank. What do I type at the prompt:

share|improve this question
Why are you asking first for one table then for all tables? Is there a specific issue you're working on or is this something like a homework problem? – Bart Silverstrim Oct 20 '10 at 17:33
@Bartimus: I anticipate doing both in the near future and thought I'd avoid doing 2 separate questions. – Detritus Maximus Oct 21 '10 at 12:40
up vote 0 down vote accepted

Create new table in DB2 that's a copy of practices in DB1:

Mysql> USE DB2;
Mysql> CREATE TABLE practices SELECT * FROM DB1.practices;
share|improve this answer
That worked. Thanks. – Detritus Maximus Oct 21 '10 at 16:58
CREATE TABLE `db2`.`practices` SELECT * FROM `db1`.`practices`
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.