List:General Discussion« Previous MessageNext Message »
From:waldo_tumanut Date:July 10 2007 3:30pm
Subject:Re: How to restore 1 database from mysqldump of all databases
View as plain text  
Thanks for your response, Rolando.  I know all the DML to create the
database is in the mysqldump.  I was looking for a command or command
options, if there are any, to extract the DML for the database, like what
you can do with mysqlbinlog.

----- Message from Rolando Edwards <redwards@stripped> on Tue, 10 Jul 2007
09:47:15 -0400 (EDT) -----
                                                                           
       To: waldo tumanut <waldo_tumanut@stripped>               
                                                                           
       cc: mysql@stripped                                           
                                                                           
  Subject: Re: How to restore 1 database from mysqldump of all databases   
                                                                           

When the mysqldump ran against all databases, the USE <db-name> command
should have appeared above each section of that databases dump. Try using
Perl or the head or tail Unix command to hunt down the Database you are
dumping. Read all lines until the next USE <db-name> command.

Example: If you mysqldumped databases DB1, DB2 (copyright IBM), DB3, DB4,
and DB5
and you want ot restore just DB3, locate the string "USE DB3" (say its line
200000)
and "USE DB4" (say its line 250000). Copy lines 200000 to 250000 to another
SQL script.
Then run that new script.



------------------------------------------------------------
CONFIDENTIALITY NOTICE: This electronic mail transmission (including any accompanying
attachments) is intended solely for its authorized recipient(s), and may contain
confidential and/or legally privileged information. If you are not an intended recipient,
or responsible for delivering some or all of this transmission to an intended recipient,
be aware that any review, copying, printing, distribution, use or disclosure of the
contents of this message is strictly prohibited. If you have received this electronic
mail message in error, please contact us immediately by electronic mail at
emailnotification@stripped and destroy the original and all copies of this
transmission (including any attachments).

Thank you.
------------------------------------------------------------
Thread
How to restore 1 database from mysqldump of all databaseswaldo_tumanut10 Jul
  • Re: How to restore 1 database from mysqldump of all databasesRolando Edwards10 Jul
    • Re: How to restore 1 database from mysqldump of all databasesMogens Melander11 Jul
      • Re: How to restore 1 database from mysqldump of all databaseswaldo_tumanut11 Jul
Re: How to restore 1 database from mysqldump of all databaseswaldo_tumanut10 Jul
  • Re: How to restore 1 database from mysqldump of all databasesDwalu Z. Khasu10 Jul