MyBB Community Forums

Full Version: SQL Error - board wide
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have an SQL error 1054 because the mybb_sessions table is missing or empty, it is affecting the whole of the board.

http://www.scuttlebut.org/forum/

Any tips on how to reset/rebuild the table would be great, cheers.
Have you tried looking at the database?

It looks like someone or you put into a SQL Query to DELETE FROM mybb_sessions WHERE ip='71.104.3.75' LIMIT 1
(2008-10-14, 12:44 PM)Chasingu Wrote: [ -> ]Have you tried looking at the database?

It looks like someone or you put into a SQL Query to DELETE FROM mybb_sessions WHERE ip='71.104.3.75' LIMIT 1

The table was missing when I looked, so I added a new blank one. Not sure what to do next.
A table is a code you need to insert. I would make a new forum somewhere else and copy that table but edit it fit your forum.
I would install mybb on a localhost.

Once, the setup is done look at the database tables for the ip one.

Copy those fields and put them in the main site.
I suggest you recreate the mybb_sessions table using the following SQL queries (paste them in your phpMyAdmin):

DROP TABLE IF EXISTS `mybb_sessions`;
CREATE TABLE `mybb_sessions` (
  `sid` varchar(32) NOT NULL default '',
  `uid` int(10) 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',
  `loginattempts` tinyint(2) NOT NULL default '1',
  `failedlogin` bigint(30) NOT NULL default '0',
  PRIMARY KEY  (`sid`),
  KEY `location1` (`location1`),
  KEY `location2` (`location2`)
) TYPE=MyISAM;
Thanks all.

I went for the copying accross option, which seems to have worked.