Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor
How to run one database for main domain and subdomain database for main domain and subdomain chikitado msg:4550038 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 msg:4550059 9:01 am on Mar 1, 2013 (gmt 0)
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 msg:4550287 12:29 am on Mar 2, 2013 (gmt 0)
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.