Is it possible to split the instance of a dedicated box to serve mySQL on a seperate host. Example:
- www.site.com - ip 192.1.1.1
- mysql1.site.com - ip开发者_开发问答 192.1.1.2
and then I can host mySQL on this seperate subdomain server even do:
$dbhost="mysql1.site.com";
or
$dbhost="mysql1.site.com:3001";
// i dont know how to make ports
I have seen people do this, in once instance have
- mysql1.site.com
- mysql2.site.com
- mysql3.site.com
where mysql1 is copied per 30seconds to 2 and 3, and if 1 fails, 2 and 3 are ready for backup..
Yes, it is fully possible. You have two servers: one runs application, the other runs MySql database. Your application connects to the server running the database. No big deal.
For example on Amazon AWS the usual configuration is to run your application on Amazon EC2 server and your database on Amazon RDS server.
if you need to sandbox mysql on one host then head over to http://mysqlsandbox.net/ not suited for production though so if you have one box and need multiple installations you can look in to virtualization as well
Yes. You can have your mysqld
on a different server than the httpd
. And, yes, you can set up database replication.
精彩评论