Why not just create separate databases for each virtual server? It sounds like a perfect situation to create multiple databases, as databases do provide data separation...
mysql> create database Virtual1; mysql> create database Virtual2; mysql> create database Virtual3; mysql> create database Virtual4; mysql> show databases; +----------+ | Database | +----------+ | Virtual1 | | Virtual2 | | Virtual3 | | Virtual4 | +----------+ And then in the PHP code for each website, you connect to the appropriate database. Say for website Virtual2: $dbh = mysql_connect("localhost","user","pass"); mysql_select_db('Virtual2'); ... Access schema for website Virtual2 ... http://www.mysql.com/doc/C/R/CREATE_DATABASE.html http://www.php.net/manual/en/function.mysql-select-db.php Good luck. On Sun, 6 Jan 2002, Matthew Darcy wrote: > I have a redhat server, running apache 1.3.20. The server is running a > couple of virtual servers for different websites. I now wish to add a few > new virtual servers/domains to the machine. However (here is the twist) > these sites will need to use a different mysql schema each and have some of > the content generated with php based on the data from the different mysql > databases. > > Is this possible ??? if so what is needed to configure this setup (just > brief), and I would be very interested in hearing from someone who is > running virtual servers with each site using a different mysql database. > > Thanks, > > Matt. > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php