How I switched a MyBB(v1.8.37) forum from SQLite to MySQL. - Fri, Dec 29, 2023
I searched far and wide for this information, and the thing that people said it "doen't work" turns out it DOES WORK. THANKS INTERNET!
A couple of months back I wanted to start a new gaming community in Romania, focused and administered the same way the 2010s communities used to be. With gaming servers & forums & all that. I choose to use MyBB as my forum, since I didn’t want to pay for Discourse or IPB, and phpBB looked old and unmaintained.
-
Please read the entire post before you start. Please try this on a localhost / test forum before you do it on your main.
Step 1: Why?
Problem was, I decided to use the SQLite 3 library to install the forum, which turned out to be a mistake. SQLite is unsupported by more-or-less all forum extensions. I could not install anything! (The internal SQL errors that I would get from time to time did not help either.) So I decided to switch MySQL. But how?
Step 2: Prepare your data.
First of all, update your current forum to the last MyBB version (or the version that your MySQL forum will have). We need to do this to make sure the versions (and databases) match. After that, you need to backup EVERYTHING! So, go into your current MyBB forum, that is sqlite, and make 3 backups: A structure & data SQL backup, a Data-only SQL backup, and a backup of the .db
database file.
You know, Just in case.
I would advise to also create a backup for Theme, Attachments and Avatars.
Step 3: You will need to completely delete and reinstall the forum.
I know. It sucks. But you have to do it.
What I did is I completely deleted my forum, and downloaded the forum files again from the [ MyBB Website ]. Although it might not happen for you, you should expect the old links to break. For me they definetely break, as I moved my forum from nostalgi.ro
to nostalgiq.ro/forum/
.
When you reinstall the forum, don’t use the same username for the super-admin account, as you used on the old one. You will see why in a minute.
After you successfully installed the forum. Delete the default category and all the posts. Add this [ MyBB Merge Tool ] (the one from the website is older, and will not work) to install the old data. Attachments and Avatars will most likely not be merged successfuly.
Step 4: Use the migrate tool.
Yep. It’s that easy. Sadly, I don’t have screenshots for this, but it’s (sort-of) straight-forward.
You will have to select the MyBB as the forum you want to migrate from, and SQLite as the database. After that you follow the instructions and you should be good to go. If you see a metric ton of warnings or errors between the migration menus, don’t worry, it won’t affect you.
Whenever the tool requires you to add a path to the database, or the media folder, you need to use an absolute path (from the root).
Step 5: Finishing touches.
After successfully using the migration tool, all Categories, forums and posts should be installed correctly. If you modified the default user groups on your old forums, those were set back to their default permissions. You will have to re-modify them.
Adding back your old theme should be easy as well. I won’t go into the details here.
All the avatars are broken. You will want to change all user’s avatars back to default, or just let them to change their avatars.
The Super Admin account is the one that you created with the new forum. You can go to Admin CP > Users & Groups > Merge Users
and merge your old Super Admin account into your new Super Admin account. This way you get back the Super Admin permissions, and the account post history.
And that’s it! Your forum is now working on MySQL!
Back to Home
Categories