[wellylug] Restore MySQL database
David Harrison
david.harrison at stress-free.co.nz
Fri Oct 6 12:14:08 NZDT 2006
On 6/10/2006, at 11:25 AM, Michael Dittmer wrote:
> The MySQL file I have is a complete dump of the server using
> mysqldump.
> I only want to restore one database from the dump file.
>
> Does anyone know restore just a single database?
The quick and dirty way is to make a copy of the backup sql file,
remove any references to databases you are not interested in and
import the file.
Mysqldump keeps all sql commands associated to a particular database
together so deleting the unnecessary sql shouldn't be too hard with a
decent text editor.
As for a cleaner way I don't know, I always just backup databases
individually using a technique similar to what is described here:
http://www.howtoforge.com/forums/showthread.php?t=3827
Davdi
More information about the wellylug
mailing list