MyBB Community Forums

Full Version: Deleted table in MySQL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was trying to sort out some stuff on my forum using phpmyadmin, but I accidentally dropped the table called "mybb_banned". Now my forum doesn't work when you log in. I have thought about re-installing but my whole site is implemented into MyBB. For example, my CMS uses the MyBB login system, so now I can't edit my site. Can anyone send me the default settings for the "mybb_banned" table?

Here is the error message:
[Image: mybberror.png]

Thanks in advance for you help!
Just reinstall the file you deleted
I don''t have access to a db now to see the table structure, but if you have a backup file, check the table in question there and recreate it.
From install/resources/mysql_db_tables.php:

$tables[] = "CREATE TABLE mybb_banned (
  uid int unsigned NOT NULL default '0',
  gid int unsigned NOT NULL default '0',
  oldgroup int unsigned NOT NULL default '0',
  oldadditionalgroups text NOT NULL,
  olddisplaygroup int NOT NULL default '0',
  admin int unsigned NOT NULL default '0',
  dateline bigint(30) NOT NULL default '0',
  bantime varchar(50) NOT NULL default '',
  lifted bigint(30) NOT NULL default '0',
  reason varchar(255) NOT NULL default '',
  KEY uid (uid),
  KEY dateline (dateline)
) TYPE=MyISAM;";
Thanks for all your help, but is still not working.
Did you run that query to recreate the table at the SQL box in the phpmyadmin of your forum?
Do you still get the same error?
(2009-07-03, 08:06 PM)babjusi Wrote: [ -> ]Did you run that query to recreate the table at the SQL box in the phpmyadmin of your forum?

What query?
Open phpmyadmin and select the database you're using for your forum. From there, click the SQL tab. In the textbox, enter this:

CREATE TABLE mybb_banned (
  uid int unsigned NOT NULL default '0',
  gid int unsigned NOT NULL default '0',
  oldgroup int unsigned NOT NULL default '0',
  oldadditionalgroups text NOT NULL,
  olddisplaygroup int NOT NULL default '0',
  admin int unsigned NOT NULL default '0',
  dateline bigint(30) NOT NULL default '0',
  bantime varchar(50) NOT NULL default '',
  lifted bigint(30) NOT NULL default '0',
  reason varchar(255) NOT NULL default '',
  KEY uid (uid),
  KEY dateline (dateline)
) TYPE=MyISAM;

Click go to finish the process.
That assumes you use mybb_ as the prefix. Make sure you do.