Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [Performance] Can use ONE DB for multiple forums?
#1
Not Solved
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
Reply
#2
Not Solved
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...
We can't help everyone, but everyone can help someone - Ronald Reagan
Did you know? Your question has already been answered. But you haven't seen it yet.
Don’t  Forget to “Mark as Solved” after the fix
Reply
#3
Not Solved
Like hankumar said above, you can use the same DB as long it's not the same prefixes.
Reply
#4
Not Solved
what about keeping the users on the ONE prefix? Toungue
Reply
#5
Not Solved
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.
[Image: axolis.png]

Project, Portfolio and Product management for freelancers.
Reply
#6
Not Solved
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?
Reply
#7
Not Solved
(10-04-2015, 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.
[Image: axolis.png]

Project, Portfolio and Product management for freelancers.
Reply
#8
Not Solved
What is the appeal of sharing users among multiple MyBB installations? Why not just create new categories / forums in the same installation?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)