Gossamer Forum
Home : Products : Others : MySQLMan :

Dump a dump

Quote Reply
Dump a dump
I was told to dump an existing dump into a database...
How can I do this using MySQL man?
Thanks
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Dump a dump In reply to
Use the SQL Dump option and then IMPORT the SQL file to your new MySQL database.

Good luck!
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Stealth: Sep 13, 2002, 7:45 PM
Quote Reply
Re: [maxpico] Dump a dump In reply to
You can copy tables from one database to another by doing:

INSERT INTO newtable
SELECT * FROM olddb.oldtable

However, I'm not aware of a way to copy the whole database at once directly in mysql. You'll need to dump it to a file like Stealth suggests and then put it back into the newdatabase.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Dump a dump In reply to
Yes I have an existing dump and I must import it in the db. But I can't find an IMPORT command in MySQL man.....
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Dump a dump In reply to
Hi,

If it's an SQL dump, then you just run:

mysql databasename < file.sql

If it's a tab delimtied file, then you should use the LOAD DATA syntax:

http://www.mysql.com/doc/en/LOAD_DATA.html

Cheers,

Alex
--
Gossamer Threads Inc.