Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Question about shared database
Name: bbmak Date: June 8, 2005 at 17:29:45 Pacific OS: Linux CPU/Ram: 4.0/1024
Comment:
Right now I have a website written in php, and the website is using mysql database, but my website has so many traffic everyday. I want to know if i can set up another website, but it is using the same database
Sure, you can do that...just setup both servers and change the php appropriately (if needed) to connect to the same db...
The problem is that chances are pretty good the database load is more of a performance consideration than the webserver load, so your solution is likely backwards.
Good luck, -SN
0
Response Number 2
Name: bbmak Date: June 8, 2005 at 18:16:37 Pacific
Reply:
how do I do the backward? 2 shared mysql database?
There are any number of ways, varying in complexity. On the php side, you just need two database servers and some code in the PHP to determine which one of the two you should connect to that makes it about even. A simple solution would be to choose a random number between 1 and 2 and choose the database depending on the output.
If your users are performing updates and inserts, you need to figure out some kind of replication...Replication in mySQL.
Good luck, -SN
0
Response Number 4
Name: fambi Date: June 13, 2005 at 10:15:58 Pacific
Reply:
As your initial set-up assumes that the website is local to the db, you will also have to include some for of permissions for your seconds site to access it (if it is not local to the db).
Summary: Hey guys, Heres where I am at, I just got an associates degree in programming but i have a lt of questions about making a site, 1)if i were to make sites for people as a small business then should i ...
Summary: Hi, Just a follow up on my recent post (http://www.computing.net/answers/webdevel/few-questions-about-website-design/4004.html). I have set the page up now so that it will fill the browser window,...
Summary: Hello, My domain name (helpingkidsbrains.com) expired and it has been bought up by somebody else (After using GoDaddy's backordering service). Currently, the whois information looks like this. Domain ...