Question about shared database
|
Original Message
|
Name: bbmak
Date: June 8, 2005 at 17:29:45 Pacific
Subject: Question about shared database OS: LinuxCPU/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 here is what i want Website 1 Website 2 \ / Mysql database Are there anyway i can do that?
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: SN
Date: June 8, 2005 at 17:59:22 Pacific
Subject: Question about shared database |
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: SN
Date: June 8, 2005 at 19:13:20 Pacific
Subject: Question about shared database |
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: fambi
Date: June 13, 2005 at 10:15:58 Pacific
Subject: Question about shared database |
Reply: (edit)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). Looking for a bulk sms gateway or just want to send sms? Let me know, that's what i do!
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: