| List: | General Discussion | « Previous MessageNext Message » | |
| From: | waldo_tumanut | Date: | July 11 2007 12:51pm |
| Subject: | Re: How to restore 1 database from mysqldump of all databases | ||
| View as plain text | |||
Thanks to all who have replied. Since this thread has evolved into
discussing the dump, I would like to ask the group what are their practices
for backup and recovery on Windows platform.
Waldo Tumanut
Database Analyst
"Mogens
Melander"
<mogens@fumlers To
oft.dk> "Rolando Edwards"
<redwards@stripped>
07/10/2007 cc
06:25 PM "waldo tumanut"
<waldo_tumanut@stripped
m>, mysql@stripped
Subject
Re: How to restore 1 database
from mysqldump of all databases
A quick script solution:
create a dump pr. table in <db>.
#!/bin/bash
for tbl in `echo "use <db>;show tables;"|mysql -s -u <user>
-p<password>`
do
mysqldump -u <user> p<password> db $tbl > $tbl.sql
done
and the other way:
cat <tbl.sql>| mysql -u <user> -p<password> <db>
------------------------------------------------------------
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 databases | waldo_tumanut | 10 Jul |
| • Re: How to restore 1 database from mysqldump of all databases | Rolando Edwards | 10 Jul |
| • Re: How to restore 1 database from mysqldump of all databases | Mogens Melander | 11 Jul |
| • Re: How to restore 1 database from mysqldump of all databases | waldo_tumanut | 11 Jul |
| • Re: How to restore 1 database from mysqldump of all databases | waldo_tumanut | 10 Jul |
| • Re: How to restore 1 database from mysqldump of all databases | Dwalu Z. Khasu | 10 Jul |
