Forums / Install & configuration / One installation, multiple databases ?
Thursday 24 April 2003 4:47:10 am
Hi,
Is it possible to run several subdomains with one installation but with separate databases ?
I've found http://ez.no/developer/ez_publish_3/documentation/ez_publish_3/howtos/several_sites_with_one_installation but it doesn't mention different databases.
Karsten Jennissen
Thursday 24 April 2003 4:49:15 am
You can make any settings in the sub domain specific files you want, including database settings.
Karsten
Bård Farstad
Thursday 24 April 2003 4:49:48 am
To run multiple databases on the same installation you need to configure the site access. The site access is used to separate the different sites. When for each site access you can override all settings, including database configuration.
So all you need to do is to create the proper site access configuration ( info in the manual ) and tune the database settings for that site access. These settings will be placed in e.g.settings/siteaccess/mynewsite/site.ini.append
--bård
Documentation: http://ez.no/doc
Saturday 26 April 2003 9:25:38 am
I've got a little bit further. Now I can see different sites with content from different databases, but I can't get the admin site to load. When I try to login to the admin site it gives me an error "Kernel. No database connection could be made, the system might not behave properly.".
I have removed all the [DatabaseSettings] from settings/override/site.ini.append.php and added those setting to my settings/siteaccess/site/site.ini.append.php file.
If I leave the [DatabaseSettings] settings in the settings/override/site.ini.append.php file the admin site will show that particular sitedatabase to all my sites.
Any ideas how to accomplish database separation would be appreciated.
Jeroen van Gorkum
Monday 28 April 2003 1:46:24 pm
> When I try to login to the admin site it gives me an error > "Kernel. No database connection could be made, the> system might not behave properly.".
i had that error when i used a fully qualified domain name as <accessname> value for the HostMatchMapItems[] directive. e.g.:
file: Exponential-3.0-1/settings/override/site.ini.append.php
[SiteAccessSettings] HostMatchMapItems[]=ez3test.vangorkum.com;ez3test.vangorkum.comHostMatchMapItems[]=admin.ez3test.vangorkum.com;admin.ez3test.vangorkum.com
file: Exponential-3.0-1/settings/siteaccess/ez3test.vangorkum.com/site.ini.append
[DatabaseSettings] User=ez3test Password=********Database=ez3test
that doesn't work and displays above error. it works when i use a shorter name for <accessname> (and rename the subdirectory in siteaccess/)
[SiteAccessSettings] HostMatchMapItems[]=ez3test.vangorkum.com;ez3testHostMatchMapItems[]=admin.ez3test.vangorkum.com;admin.ez3test
hth,
jeroen.
Tuesday 29 April 2003 2:09:33 am
I tried that without any success.They still use the same db.
Tuesday 29 April 2003 5:49:39 am
correction: after more testing it seems that the connection to the database always fails if it is done from a site.ini.append in a directory that contains a dot in its name.
so, `admin.ez3test.vangorkum.com' in my previous example doesn't work after all; it shows your error. it works if i replace the dot in <accessname> and the subdirectoryname with an underscore:
[SiteAccessSettings] MatchOrder=host HostMatchType=map HostMatchMapItems[]=ez3test.vangorkum.com;ez3test HostMatchMapItems[]=admin.ez3test.vangorkum.com;admin_ez3test...
file: Exponential-3.0-1/settings/siteaccess/ez3test/site.ini.append
[DatabaseSettings] User=ez3test Password=******** Database=ez3test...
file: Exponential-3.0-1/settings/siteaccess/admin_ez3test/site.ini.append
configuration details: * debian GNU/Linux 3 woody * apache 1.3.26 * php 4.1.2 * mysql 3.23.49* Exponential 3.0-1
Wednesday 30 April 2003 10:38:50 am
Thanks, I'll try that
Alexandre Cunha
Sunday 15 June 2003 6:38:24 am
Thanks Jeroen
Your setup works on windows too.
axel
http://AlexandreCunha.com