MyBB Community Forums

Full Version: SQL Error HELP!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
145 - Table './tp2_mybb494/mybb_posts' is marked as crashed and should be repaired
Query:
SELECT COUNT(*) AS newposts FROM mybb_posts WHERE dateline > '1312753423' AND visible='1'
Please contact the MyBB Group for support.

How do I fix this?
Run this query in phpMyAdmin:

REPAIR TABLE `mybb_posts`;
PS: I tried running these queries:

REPAIR TABLE mybb_posts

REPAIR TABLE mybb_posts; 

And neither worked. I got a message that said:

Error
SQL query:

REPAIR TABLE mybb_posts;


MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REPAIR TABLE mybb_posts' at line 1
Is your database prefix mybb_?
(2011-08-08, 09:47 PM)faviouz Wrote: [ -> ]Is your database prefix mybb_?

No, it's "/forum/"
No, that's not what I'm talking about. In ./inc/config.php what does line 12 read?
(2011-08-08, 09:50 PM)faviouz Wrote: [ -> ]No, that's not what I'm talking about. In ./inc/config.php what does line 12 read?

Oh, it says "mybb_".
Odd. What if you go to Admin CP > Tools & Maintenance > Task Manager and try to run the Tables Check task (by clicking the alarm icon next to it)? What happens there?
It says,

The selected task has been run successfully.

And the error isn't showing anymore...
Well, there you go. Toungue

Still not sure why the SQL query didn't work though.
Pages: 1 2