#!/usr/local/bin/perl ############################################################################## # # mysql_restore.pl # # replace and with the # correct values. Make sure the correct name is in $updatefile # ############################################################################## $database=""; $user=""; $password=""; $updatefile="$ENV{'DOCUMENT_ROOT'}/cgi-bin/restore.sql"; $command = "/usr/bin/cat $updatefile | /usr/local/mysql/bin/mysql -f --password=$password -u $user $database"; $|=1; print "Content-type: text/html\n\n"; print " Update of $database database\n"; print "Output from: $command
\n"; print "
";

system "$command";

print "

\n"; print "
Done\n"; exit 1;