MyBB Community Forums

Full Version: Connecting to a DB from another site?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Connecting to a DB from another site?


Hi,

I have just setup a forum on http://mydomain.com but now I want to also use the same forum and the post within that forum on http://anotherdomain.com but do not want to redirect this domain, Is their a way of making it to that http://anotherdomain.com will take all post and threads made on http://mydomain.com and show them on http://anotherdomain.com and the same the other way around?
Anyone?
Not many hosting companies would allow access to their databases from another server. Try asking them though.
I was asking if their is a way to connect to the DB? I want to use the DB that on MY server but use diffrent thems etc but when my make a post it show up on both sites.
Yes you can connect from different hosts. But your host has to allow it. More specifically, the database user you are trying to use to connect to the database, has to have permissions to access the database from a number of hosts.

If you have CPanel you can do this, but I forgot the exact procedure. If your host uses a different package, you will need to ask them how to set it up. Instead of specifying localhost, you will need a direct link to your database.

Yes it is possible, but with too many variables, there isn't much advice I can give. Check with your host.
If you use CPanel, in the MySQL section, somewhere on that page, there should be a place called 'Access Hosts', and you should allow the IP address of your other server to be on there I think.

And as decswxaqz said, it's just a matter of changing 'localhost' to your database server on the installation, or in the config.php if you've already installed.
Will that enable me to change the them etc on http://anotherdomain.com
As long as your database user has the permission to, and that it allows another server to access the database, then yes.