Error restoring SQL database Error restoring SQL database
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Error restoring SQL database

Started by massive, March 18, 2009, 04:27:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

massive

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

massive

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;

Nibbler

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.

massive

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?

Nibbler

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.