Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved SQL Error 1054 Unknown column p.posthash in where clause
#1
Not Solved
I was upgrading MyBB to 1.8.x and things didn't go well. I reloaded a backup of 1.6.9 and everything is running except the ability to post. I can preview posts but when I try to post I get this error.

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:1054 - Unknown column 'p.posthash' in 'where clause'

QueryConfusedELECT p.pid, p.visible FROM mybb_posts p WHERE p.uid='1' AND p.tid='10187' AND p.subject='RE: Colonial and civil war ERA relics at the beach' AND p.message='test' AND p.posthash='58f8a123f783f474c3d6e2d600c412eb' AND p.visible != '-2'

You can see the error at my website TreasureIllustrated.com if you try to post to a thread it will pop up.
I know very little about mysql but am a quick learner and can follow directions.

I appreciate any help I can get.

Thanks,
H.Charles
#2
Not Solved
It appears you haven't imported a backup of yout database to restore your previous version.
[Image: banner.png]
#3
Not Solved
Thanks Stefan.

Is there a way to determine which version the database is running? And is it possible to repair this without uploading an older backup? I do have a backup from Tuesday morning .... Everything went haywire on Tuesday evening.

The MyBB forum is now running 1.6.9 and this is the only error that I'm receiving.

Thanks for your help.

H.
#4
Not Solved
datacache table of MyBB forum database consists of version information.
eg. field => version , value => a:2:{s:7:"version";s:6:"1.6.9";s:12:"version_code";i:1609;}
#5
Not Solved
(09-17-2015, 04:55 PM).m. Wrote: datacache table of MyBB forum database consists of version information.
eg. field => version , value => a:2:{s:7:"version";s:6:"1.6.9";s:12:"version_code";i:1609;}

Yep that's what I have...
a:2:{s:7:"version";s:5:"1.6.9";s:12:"version_code";i:1609;}
except mine says s:5 instead of s:6
Is that an issue?

Sorry I'm so illiterate when it comes to Mysql.
#6
Not Solved
that should not be an issue.
run file verification tool available at tools & maintenance section of admin panel to find missing / changed files.
ignore files reported from install folder & its subfolders. Also ignore reported images.
you have to replace reported files from MyBB source files pack of your forum's version.

(if you are using Google SEO plugin then do not replace ~/inc/functions.php file)
#7
Not Solved
(09-18-2015, 03:00 AM).m. Wrote: that should not be an issue.
run file verification tool available at tools & maintenance section of admin panel to find missing / changed files.
ignore files reported from install folder & its subfolders. Also ignore reported images.
you have to replace reported files from MyBB source files pack of your forum's version.

(if you are using Google SEO plugin then do not replace ~/inc/functions.php file)

File Verification: Found Problems
File                                                                             Status
images/smilies/angry.gif                                      Changed
images/smilies/cool.gif                                         Changed
inc/plugins/akismet.php                                       Missing

It doesn't appear to me that any of these would cause the Sql error.
It looks to me that the issue is in the MyBB posts and MyBB Threads databases .... but I could be wrong. I just don't know since this is my first time doing this.

When I look at MyBB_Posts in the Mysql database I see this message:
More than one INDEX key was created for column tid

MyBB_Threads has a similar message
More than one INDEX key was created for column uid
[img]<a href=[/img][Image: 2015-09-18_0-51-34_zpsdabl3luv.jpg]" />



I'm trying to import a backup of the database from Monday (the day before the issue started) but it's too large so I'm figuring out how to do that.
Am I doing the right thing or on the right track to fixing this?
#8
Not Solved
Try this for a large database: http://www.ozerov.de/bigdump/
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#9
Not Solved
Thanks Leefish! I'll give it a try.


Forum Jump:


Users browsing this thread: 1 Guest(s)