MyBB Community Forums

Full Version: `mybb_sessions` crashed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have tried the repair option in my cPanel in MySQL but nothing came of it.
I then went into phpmyadmin and clicked on mybb_sessions and see the error.
Where do I go from here to fix this?

#145 - Table './cinema_cinemamybb/mybb_sessions' is marked as crashed and should be repaired
In the PHPMyAdmin query window paste the following query:

repair table mybb_sessions;

This will repair the table from PHPMyAdmin; sometimes the CPanel database tools don't work as expected.
I'm not sure where exactly to do that.
I clicked on QUERY and I see many areas.
The area where is has the button "SUBMIT QUERY" ?
First, click on your database on the left. Then at the top left there will be 5 buttons. Click the middle one that says SQL. A box will pop up. Paste your query in that window and submit. Smile

BMR777
Thank you!
Though that didn't seem to work Undecided

Should I just drop it ? (assuming a new one will be created)
You could try:

DROP TABLE mybb_sessions;
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',
  loginattempts tinyint(2) NOT NULL default '1',
  failedlogin bigint(30) NOT NULL default '0',
  PRIMARY KEY(sid),
  KEY location1 (location1),
  KEY location2 (location2),
  KEY time (time),
  KEY uid (uid)
);

I'm not sure if this query will work or what ill effects may come of running it. Are you having trouble logging in or anything like that?

You could try running this query and if you have issues you could restore just the sessions table from your backup. It's up to you.

BMR777
That worked! Thank you much! Big Grin

I will assume this is a host issue with MySQL ?
A crashed table could be a host issue. It's usually nothing to worry about if it happens once, but it it happens over and over again then you should contact your host.
You can follow this advice to permanently get rid of that error:

http://www.mybbcentral.com/showthread.php?tid=790
Repairing a table without PhpMyAdmin: (read here)
http://community.mybboard.net/thread-22002.html