Gallery2 database error

I thought the sky almost fell down just then when I went to my gallery2 install­a­tion (/​gallery) and saw that it had a data­base error. “Noooo!!! I’ll have to spend hours rein­stalling and upload­ing again!” The error in ques­tion was

An error has occurred while inter­act­ing with the database.

If you get this error, don’t panic. For me, it turned out that one of the data­base tables was cor­rup­ted and needed repair­ing. Log in to phpMy­Ad­min or to the mysql con­sole and check whether any of the tables are lis­ted as cor­rupt. In my case, it turned out to be g2_CacheMap.

I snooped around some for­ums, and in the threads that had responses (a lot of for­ums have ques­tions left unanswered unfor­tu­nately), it seems like the blame lies with your host hav­ing a bad mysql setup or bad hard drives that cor­rupt at ran­dom. Shame on you, Blue­host.

Related posts:

  1. Nuffn­ang and Inter­net Explorer
  2. The death of suitsbeta

Tags: , , , ,

  1. Victor’s avatar

    So how do you repair this table? The same table was cor­rupt in my case.

    We are hos­ted on Lun­arpages, so this may actu­ally be a Gal­lery 2 defi­ciency rather than a host­ing pro­vider issue…unless Blue­host and Lun­arpages are one and the same due to the pop­ular­ity of reselling hosting.

    Reply

    1. Enoch Lau’s avatar

      Thanks for provid­ing a link, and I’m glad you resolved your issue.

      Reply

    2. Carlos’s avatar

      Awe­some! I had exactly the same issue and was able to quickly and eas­ily fix fol­low­ing the intruc­tions on this thread.

      Thanks for those who took the time to resolve this and post the solution.

      Cheers!

      Reply

  2. Simon’s avatar

    AWESOME. Thanks for the tip sir. My Gal­lery was down for almost a year because i was too lazy to re-​​install. For­tu­nately, i came across your site which led me to repair the table via phpMy­Ad­min. Saved me hours.

    :D

    Reply