Forum Moderators: open

Message Too Old, No Replies

using 1 database for 2 sites

mysql database

         

bellybuttonlint

2:36 am on Nov 4, 2006 (gmt 0)

10+ Year Member



i have 2 domain names. blabla.com and bla-bla.com ( not real of coarse )....

bla-bla.com/forum has a forum.
blabla.com doesnt have 1

what i would like to achieve is having the same forum run under the other domain name as well.

so lets say i have a visitor and registar visit the blabla.com, they are also integrated with the rest of the members/visitors on the other forum.

possible? im sure it is, but how hard is it and how do i begin.

the first forum is getting pretty healthy at over 11,000 members with 4 thousand attachments.

physics

5:03 pm on Nov 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you want the _exact_ same forum with the same content or just to have users registered at one forum to be auto-registered at the other?

If you just want the users then one way to do it would be to set up a seperate forum on the other site and then have a script that runs, say, every hour and copies users from the user db on the first site to the one on the second (and vice versa I guess).

LifeinAsia

7:36 pm on Nov 6, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It's much easier if you have both domains hosted on the same server. Then you have all the settings the same for both domains- no worrying about copying tables or having data out of sync.

jtara

5:30 am on Nov 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sure, this is possible. But you have to step back and think about what you really want. This really isn't a database question.

Exactly the same forums on both sites? Or just the same forum software? (And common registration.)

Do the forums have to be "branded" with the site name? What kind of templating capability does your forum software have? (Worst case, you can always leave off all identification, and plop it in an iframe on each site.)

As far as MySQL (and most other databases) you can easily use one database server and access the same or different database(s) from 1 or 100 sites (depending on load, of course) on the same or different computers, in the same or different datacenters. Most databases connect to the software that access them on a network socket, so you have a great deal of flexibility.

As for your forum software... who knows. Depends on how your forum software is written. In most cases, though, you will at least be able to specify where the database server is, and can point two or more sites to the same database server. But to have the same forums and/or same users on multiple sites, you would have to make sure the software is written to handle this - it would have to make sure to use transactions to prevent database corruption. If it simply relies on local filelocks, or single-threading, for example, no go.

Depending on just what you are trying to accomplish, this could be as simple as some fancy footwork with mod_rewrite, and the use of some server variables in forum templates.

But first you have to clarify just what it is you are trying to do.

bellybuttonlint

5:59 am on Nov 9, 2006 (gmt 0)

10+ Year Member



I definetly appreciate the responses and wealth of information.

The software I use is SMF ( simple Machines Forum )

I decided to just hard link it from the other domain, this way it helps my search engine ranks.