Skip to:

Locked Out of Forum!

  • I’ve just installed bbPress (. and tried to integrate it with my WP site (2.6.5). (I just read some of the sticky about integration and see that i shouldn’t be integrating WP 2.6 with bb 0.9, but that’s something i can look at afterwards.)

    Thing is, i think i’ve put the wrong database prefix or something like that since i’m getting the following errors (i’ve substituted ‘db’ for the name of my database):

    bbPress database error: [Table ‘db.dbusers’ doesn’t exist]

    SET NAMES ‘utf8’

    bbPress database error: [Table ‘db.dbusers’ doesn’t exist]

    SELECT * FROM dbusers WHERE user_login = ‘admin’

    As a result i can’t get into bbPress.

    Can someone tell me how i can fix this?

Viewing 11 replies - 1 through 11 (of 11 total)

  • chrishajer


    Do you have access to the database with a tool like phpMyAdmin or something in your host’s control panel? You will need to directly access the database to fix it I think.

    Yes i do have db access with phpMyAdmin, but i don’t know what to do.



    If you substituted db for the name of your database in your example, then it appears you have no table prefix at all for your bbPress tables, or you used db with no underscore where the first db is the database name you edited out, then db is the table prefix, but it really doesn’t look like one. If you use phpMyAdmin to look at the database, you might find that you have bbPress tables there, but with no prefix or a db prefix (not database name, but just two characters db before teh table name). So, you’ll have your wp_ tables, then you will have a bunch of tables with names like:




    Can you look at the database and take a screenshot of the table structure and host that somewhere then link to it here? Maybe with that info, someone will be able to figure out what you did.

    hi chris

    actually i don’t think i even need the screenshot. i had a look at phpMyAdmin and the tables have no prefix.

    so there’s the database name, then tables names eg

    users, user_meta, topic

    so the full name is for example db.users, not db.dbusers. so i’m pretty confident that’s what the error is – i’ve mistakenly given a table prefix when there is none. but i still don’t know how to get round it.

    i thought table prefixes might be defined in a file somewhere, but if so i can’t find it. and if you have do do something in phpMyAdmin i don’t know what.



    It looks like you have an extra db in there. So if your database is database, your tables are actually named database.dbusers, for example?

    The default would be database.bb_users.

    To change the table prefix your bbPress installation uses, there is a value in bb-config.php called $bb_table_prefix which is normally set to “bb_”. What is the value in your file?

    To recover, you might want to rename all your tables using a prefix, then add that prefix to bb-config.php for $bb_table_prefix. I think that would work.

    I think leaving the tables with no prefixes is a bad idea, because if you install other software in the same database, you might have a conflict with similarly named tables. Not every application behaves well and allows a table prefix. oscommerce used to do that (no table prefix, just tables with normal names that would step all over any existing similarly named tables.)



    To get bbPress you work you might be able to go into bb_config.php and edit this line

    $bb_table_prefix = 'bb_';

    and make it say

    $bb_table_prefix = '';

    (that’s just two single quotes together with no space)

    Not sure if it would work and it’s bad idea to keep running like that.

    Using phpMyAdmin, you could try to rename all the tables to bb_users, bb_usermeta, etc.

    But do you see your WordPress tables? You have a bigger problem is there’s wp_users and wp_usermeta and then you don’t see topics forums posts tables.

    You may have installed bbpress into a new database instead of the old wp database?

    Copy all the names of the tables in the left hand site of phpmyadmin here so we can see better what’s wrong.

    hi chris and ck

    i missed something obvious, didn’t explain about my databases and probably confused you in the process.

    so i’m going to try to clarify. bbPress and WordPress have separate databases. by substituting db for the name of my database, i obscured the fact that the errors referred to in my initial post are looking for my WordPress users table ie in my WordPress database, not bbPress.

    in phpMyAdmin i can see that my WordPress tables have no prefix, while my bbPress tables have an underscore prefix:

    BB Tables

    i tried putting db (my database) as a prefix in my wp-config file just to see if that would work, but i still got the same errors (so changed it back to what it was, since it also took my WordPress site down, though it was fine again once i removed the prefix from wp-config).

    so i still have no idea of what to do.

    i remember when i was setting up integration for bbPress that i specified a table prefix – i’m wondering whether it would be simpler to uninstall bbPress and reinstall it again, trying to avoid the prefix problem? i’d lose a bit of stuff i entered, but there’s not much and i could easily recreate it.



    Change the bbpress tables prefixs to bb_ via phpmyadmin and then fix the prefix setting in bb-config.php

    hey ck

    that suggestion didn’t make sense to me, since as i mentioned in my last post, the errors refer to my WordPress users table, not bbPress. still, after i worked out how i could change table names without using a query, i did as you said. the result was the same errors i got in my original post.

    however as i now knew how to change table names, what Chris had said earlier suggested that i should try adding the database name as a table prefix to my WP users table. i did that, and when i tried to log in, one of the errors was gone. however the other error that came up was that bbPress was now looking for my WP usermeta table. so again i added the database name as a prefix to that and i was in!

    unfortunately, while i got in with admin access, i no longer had access to the settings, so i couldn’t delete the database prefix to the tables.

    i’ve decided that this is becoming such a mishmash that i’m going to uninstall bbPress and reinstall it again, trying to avoid the error with the database prefix. in any case, thanks to both of you and Chris for your help, i learnt some handy things in the process!

    What is locking and pinning up?

    locking – Closing a topic so no one can add to it.

    pinning – Setting a topic ‘sticky’ so it’s always at the top of the topics lists

    Those are pretty standard terms for forums.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar