MyBB Community Forums

Full Version: Can use ONE DB for multiple forums?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can I  use ONE DB for multiple forums?

that is using ONE DB to store users and usegroups, but have forums, threads and posts in separate fields with extra prefix?



_forum1
_forum2
if i understood you correctly, yes you can have multiple installs of MyBB on a single DB as long as they have a different prefix for each install...
Like hankumar said above, you can use the same DB as long it's not the same prefixes.
what about keeping the users on the ONE prefix? Toungue
Yes, it is possible but not without making changes to the source code - which will make it near impossible to install updates. You are better off keeping the databases separate and syncing the _users table between the forums. It can be done without hardcoded changes, but it requires at least intermediate PHP skills. Let me know if you want to take on that journey and I will help you as much as possible. I have integrated many websites with mybb forums before.

Edit: Noticed the tag "Performance", this won't help performance. You are better off using memcached and ZendOPCache for that.
hey thanks for the offer, i am just bouncing some ideas off your guys and see what the potential is for myBB, when i get my themes and functions all sorted and move the test board from localhost i will seek your offers as I run into problems,,,

thanks

PS. would it help performance if the userDB is in one DB and the Forums in another DB?
(2015-10-04, 08:59 AM)expat Wrote: [ -> ]hey thanks for the offer, i am just bouncing some ideas off your guys and see what the potential is for myBB, when i get my themes and functions all sorted and move the test board from localhost i will seek your offers as I run into problems,,,

thanks

PS. would it help performance if the userDB is in one DB and the Forums in another DB?

No, MyBB would have to maintain 2 connections. The best way to not affect MyBB's performance is to have some of the data synced (avatar, password, email, password reset key - just to name a few) while the rest is handled by mybb (like pustcount - which is forum specific). What you want is more like a central authentication system but you also want to be able to update your forums so you want to build a layer above MyBB which ensures that if a user changes the email address on a forum this change is sent to all other forums.

What I would probably do is set up a plugin which listens for events affecting the user's data, if such even is trigger you connect to all databases and make the same change on them. You can have the database info of your other sites in inc/network.php, adding a new site would require you to edit all inc/network.php files though so you might want to have a single file located in a directory outside all mybb installations, provided that security restrictions would allow the inclusion. I don't want to confuse you with this, just writing down some information that you might find helpful before you start and while you are workout out the architecture of this.
What is the appeal of sharing users among multiple MyBB installations? Why not just create new categories / forums in the same installation?