Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Error restoring SQL database  (Read 3443 times)

0 Members and 1 Guest are viewing this topic.

massive

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Massive Imageworks
Error restoring SQL database
« on: March 18, 2009, 04:27:26 pm »

I was trying to update my CPG and add Captcha after bots invaded my comments... When I got Captcha installed, it wasn't working correctly, so I started following steps to uninstall and reinstall it... However, when I was deleting/dumping parts of my database, something went awry because my site started giving me a "fatal error" upon load.

I went back to the backup of my database I had made before the whole update process, and used phpMyAdmin to dump the old tables and import from the backup.
Then I hit this error:

SQL query:
/*!40000 ALTER TABLE `cpg135_pictures` DISABLE KEYS */;


MySQL said: Documentation
#2006 - MySQL server has gone away


I'm not savvy enough with MySQL to know what all that means, can someone help me sort it out?

thanks
Logged

massive

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Massive Imageworks
Re: Error restoring SQL database
« Reply #1 on: March 18, 2009, 06:02:14 pm »

UPDATE:

Just for funsies, I found the offending bit of code in my SQL database and deleted it. Afterwards, I was able to restore the rest of my tables without problems. After some googling, I found a few people that have suggested that an unusually large table entry could cause a timeout and an error like what I got... However, I'm at the mercy of my webhost to change my timeout settings, so I can't really do anything about that.

here is the offending code:
LOCK TABLES `cpg135_pictures` WRITE;
/*!40000 ALTER TABLE `cpg135_pictures` DISABLE KEYS */;
INSERT INTO `cpg135_pictures` (`pid`, `aid`, `filepath`, `filename`, `filesize`, `total_filesize`, `pwidth`, `pheight`, `hits`, `mtime`, `ctime`, `owner_id`, `owner_name`, `pic_rating`, `votes`, `title`, `caption`, `keywords`, `approved`, `user1`, `user2`, `user3`, `user4`, `url_prefix`, `randpos`, `pic_raw_ip`, `pic_hdr_ip`, `lasthit_ip`) VALUES ([[[a whole mess of file names and data are here. I just deleted them to save space on the forum]]]);
/*!40000 ALTER TABLE `cpg135_pictures` ENABLE KEYS */;
UNLOCK TABLES;
Logged

Nibbler

  • Guest
Re: Error restoring SQL database
« Reply #2 on: March 18, 2009, 06:08:33 pm »

You can avoid the long queries by disabling the 'Extended inserts' option when dumping from phpmyadmin. Alternatively, reducing the value for 'Maximal length of created query' should also help.

Not a Coppermine related issue however.
Logged

massive

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Massive Imageworks
Re: Error restoring SQL database
« Reply #3 on: March 18, 2009, 07:04:14 pm »

I more or less gathered that it wasn't Coppermine's fault...

The fact remains that I'm missing some pretty critical data here. Yet I still have the backup. It's too late for me to disable Extended Inserts or to reduce the value for Maximal length-- I've already made the backup and the original database has been dumped.

Is there another way to put this data in my database through phpMyAdmin, now that I'm stuck with the backup I have?
Logged

Nibbler

  • Guest
Re: Error restoring SQL database
« Reply #4 on: March 18, 2009, 07:26:02 pm »

You could install mysql locally, import your data and then re-export it using different settings.
You could ask your host to import the data for you.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.