MyBB Community Forums

Full Version: SQL Query to install the database?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey, Basically I have changed hosts. I have a backup of my DB and have no idea on how to restore it. I have not reinstalled MyBB is simply copied my homedir on one host to the homedir on the other. I need to know what to imput into phpmyadmin to allow me to restore the database. I can import data from the backup, but how do I create the default tables you start with on a clean install?

I am running latest version of MyBB.

Thanks.
Hi,
I assume you didn't export table structures when you backed up the DB from your previous host? If you did, you should be able to just import the backup and the tables will be created automatically. If you didn't, things are a little more tricky - you can try this, if this is the case (note, if you have some plugins which have modified various things, this may not work 100% correctly):
1) Backup your inc/settings.php and inc/config.php file
2) Run the installer, installing a fresh copy of MyBB
3) Once you've installed everything, MyBB should've created the initial tables. Empty everything in these (should be able to tick all in phpMyAdmin and empty/truncate), then load your backup.
4) You'll need refresh your cached settings - go to the AdminCP -> Configuration -> Settings. Choose any category, and just choose to update your settings.
5) If you have chosen to store your datacache in files (if you don't know what this is, you probably haven't done this), delete all *.php files in the cache/ directory (don't delete anything in subdirectories)