MyBB Community Forums

Full Version: SQL Syntax Errors - Upgrade - Missing Table -
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So the other day I switch to a dedicated server and the transition was smooth. However yesterday at the hosting data center there was a network outage. After the server came back online, it was one SQL error after another. I reloaded my page at one point, and mostly ALL of my forums had disappeared. Admittedly I was running more plugins than I should have been, however everything was functioning properly before the network outage.

After the forums disappeared, I upgraded to Mybb 1.6.11 from version 1.6.9

The upgrade seemed to go ok after fixing a few issues, however the forums were still missing.

I attempted to restore a db backup from Nov -19. The restore went smooth according to phpMyAdmin, however upon going to the board, I was prompted with the upgrade notification:
Quote:MyBB Internal Error

MyBB has experienced an internal error and cannot continue.

Error Type:
MyBB Error (42)
Error Message:
Your board has not yet been upgraded. Please do so before attempting to browse it.

So I go through the motions of unlocking and attempting the upgrade and I am presented with this error:
Quote:MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table '******_grf.mybb_sessions' doesn't exist
Query:
SELECT * FROM mybb_sessions WHERE sid='***************************' AND ip='*********' LIMIT 1

Hoping to get my board online soon. Any help would be greatly appreciated.

This issue has been resolved.
Run this in phpMyAdmin to recreate your sessions table:
CREATE TABLE mybb_sessions (
  sid varchar(32) NOT NULL default '',
  uid int unsigned NOT NULL default '0',
  ip varchar(40) NOT NULL default '',
  time bigint(30) NOT NULL default '0',
  location varchar(150) NOT NULL default '',
  useragent varchar(100) NOT NULL default '',
  anonymous int(1) NOT NULL default '0',
  nopermission int(1) NOT NULL default '0',
  location1 int(10) NOT NULL default '0',
  location2 int(10) NOT NULL default '0',
  PRIMARY KEY(sid),
  KEY location1 (location1),
  KEY location2 (location2),
  KEY time (time),
  KEY uid (uid),
  KEY ip (ip)
) ENGINE=MyISAM;