Re: Programmatic MySQL backup in Perl

2002-12-20 Thread Jeff Snoxell
Hello, I've successfully backed up my database to JeffsDB.sql using mysqldump with the -opt option. When I try to restore it using: mysql -h myhost -u myusername -ppassword JeffsDB < JeffsDB.sql I get: ERROR 1065 at line 21: Query was empty Now, line 21 of the SQL file contains: /*!4 AL

RE: Programmatic MySQL backup in Perl

2002-12-19 Thread Peter Vertes
The way I do it is to call mysqldump.exe from perl, granted it's not the most elegant way but it's certainly the fastest (to code). Just do: --- # name or IP address of dbmachine my $DB_server = localhost.localdomain.tld # db login authorised to do db dump my $DB_User = sa # location and name

RE: Programmatic MySQL backup in Perl

2002-12-19 Thread Norris, Joseph
Jeff, Here is a piece of my backup script. Its been modified from Unix world to windoze world ( because at this point I am working in that environment - seeking to return to Unix if anyone has a gig ) =pod =head1 Script: mysql_backup.pl =head2 =over 4 =item 1 This script builds a db dump fil