moving data between databases in mysql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
superdude83
Forum Newbie
Posts: 2
Joined: Mon Sep 12, 2005 12:38 pm

moving data between databases in mysql

Post by superdude83 »

hi,
I was wondering what the most efficient way is to move data in tables from one database to the other. If for example I wanted to add new parts of the database, or wanted to change it for some reason..how would I transfer data already in the old database to the new database?

Thanks for the help.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

export, import.

if your database supports it, you can also do a

Code: Select all

INSERT INTO `database1name`.`table1name` SELECT * FROM `database2name`.`table2name`
Post Reply