in reply to Restoring a MySQL DB

You could use the run_restore_script method in MySQL::Backup.

For example, the following will rebuild your database.

#!/usr/bin/perl use strict; use warnings; use MySQL::Backup; my $filename = "backup_20070329.sql"; my $mb = new MySQL::Backup('mydb','127.0.0.1','user','password',{}); $mb->run_restore_script($filename);
This completely replaces the database schema and repopulates the data.

Replies are listed 'Best First'.
Re^2: Restoring a MySQL DB
by Negrazo (Initiate) on Apr 13, 2007 at 16:23 UTC
    Hey snoopy: I saw your tip and immediately applied it to my application and it worked. I thank you for your time and support. I learned something new today. Thank's again. Negrazo.