Welcome to WebmasterWorld Guest from 54.227.110.209

Forum Moderators: open

Message Too Old, No Replies

How to run one database for main domain and subdomain

database for main domain and subdomain

     

chikitado

5:47 am on Mar 1, 2013 (gmt 0)



Hi all!

i'm newbie and i can't setup one database for main domain and subdomain.

ex:
main domain is http://example.com (hostting A)
subdomain is forum.example.com (hostting B)

please help me how to run one database for main domain and subdomain.

Thanks!

[edited by: engine at 3:34 pm (utc) on Mar 1, 2013]
[edit reason] please use example.com [/edit]

topr8

9:01 am on Mar 1, 2013 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



well i assume you have set up the database on one of the domains, probably the main domain.

how do you connect to this database? using localhost?

are the two sites on the same sever or different?

if different then you might need your hosting company to tell you how or to change some permissions (if they will)

if the same you should just be able to connect to it no problem using the same wmethod that you do already fromt eh first site.

phranque

12:29 am on Mar 2, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



welcomne to WebmasterWorld, chikitado!

if the web servers are on separate hosts then you will have to pick one of them to be the db server.
when making the connection from the other web server you will have to address the db server by IP address or hostname.
the database will likely have to be configured properly to authorize a connection from a remote host.
you might need some technical support from your db server hosting provider to get this working.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month