MyBB Community Forums

Full Version: Pointing your forum to a new database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm creating a test forum based out of a backup of my current live forum. Which file do I need to edit in order to point my test forum to a new database?

Is there any additional options or problems I need to consider/change (Cookies, table prefixes, etc...)?

Should I just install a fresh copy instead?
To point to a new database, you'd need to edit the details in ./inc/config.php; you'll only need to change the prefix if the prefix on the new database is different to the old one, and you'll only need to change the cookies if the URL is changing.
Hey thanks Matt. Alright so I changed the config file to represent the new database name but I got a database error when I checked it out.

"MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'xkillaxgirlz-MyBBtest.mybbtest_datacache' doesn't exist
Query:
SELECT title,cache FROM mybbtest_datacache"
Something will be wrong with one of the details, most likely the prefix.
Blah. Would it be easier for me to erase it an install everything from scratch?
Not really, if you've got a database that you're trying to point it to you'll just need to get the details right. Have a look at the tables in the database you're trying to use, if they don't start with mybbtest_ then that's not the right prefix to use.
Alright thanks. I think I'll be able to figure it out.