SneakyDave
11-30-2000, 02:29 PM
I had to recover from a problem in MySQL a while ago, and luckily, I had a backup from the previous day.
Granted, I need to put in an automatic process to update this database daily, but for now, I'd been using phpMyAdmin's utility to Send the dump to my PC.
But when I uploaded the .sql script to DROP, CREATE, and INSERT into the tables to propogate them, I got an error every time on the second INSERT statement, just a general SQL error.
I have magic quotes off, and the only thing I realized is that phpMyAdmin addslashes all the quotes in the statement. For instance, this is what the code looks like when I upload it, and MySQL tries to execute it.
INSERT INTO Members (id, username, passwd, email) VALUES ( \'1\', \'frank\', \'AbCdEfG\', \'blah@blah.com\');
INSERT INTO Members (id, username, passwd, email) VALUES ( \'2\', \'rizzo\', \'HiJkLmNoP\', \'yada@yada.com\');
It tells me there's an SQL error on the second INSERT, but maybe it really doesn't like the first line. Could it be because it doesn't think there's a new line after the semi-colon of the first INSERT?
Anyway, this isn't on an FQ installation, I just thought I'd ask the friendly MySQL experts if they've ever run into this.
I'm probably better off just creating a script to mysqldump the database, and import it from a command line if I ever need to.
Thanks for your time.
Granted, I need to put in an automatic process to update this database daily, but for now, I'd been using phpMyAdmin's utility to Send the dump to my PC.
But when I uploaded the .sql script to DROP, CREATE, and INSERT into the tables to propogate them, I got an error every time on the second INSERT statement, just a general SQL error.
I have magic quotes off, and the only thing I realized is that phpMyAdmin addslashes all the quotes in the statement. For instance, this is what the code looks like when I upload it, and MySQL tries to execute it.
INSERT INTO Members (id, username, passwd, email) VALUES ( \'1\', \'frank\', \'AbCdEfG\', \'blah@blah.com\');
INSERT INTO Members (id, username, passwd, email) VALUES ( \'2\', \'rizzo\', \'HiJkLmNoP\', \'yada@yada.com\');
It tells me there's an SQL error on the second INSERT, but maybe it really doesn't like the first line. Could it be because it doesn't think there's a new line after the semi-colon of the first INSERT?
Anyway, this isn't on an FQ installation, I just thought I'd ask the friendly MySQL experts if they've ever run into this.
I'm probably better off just creating a script to mysqldump the database, and import it from a command line if I ever need to.
Thanks for your time.