# Runtime selection of Database

**URL:** <https://www.ruby-forum.com/t/runtime-selection-of-database/134492>\
**Category:** Rails\
**Created:** [April 11, 2008, 11:56am UTC](https://www.ruby-forum.com/t/runtime-selection-of-database/134492 "2008-04-11T11:56:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/258eb7/32.png) [@rakesh](https://www.ruby-forum.com/u/rakesh)\
**Post date:** [April 11, 2008, 11:56am UTC](https://www.ruby-forum.com/t/runtime-selection-of-database/134492/1 "2008-04-11T11:56:52Z")

</div>

Hi,

I have created an application in which I would like to select database  
runtime. Actually I have created numbers of subdomains and as per the  
subdomain the database should be selected on the conditional base  
whatever the domain name is received in url . In short as per the  
domain the database should be connected in mysql. Please suggest me  
the possible way to overcome this problem.

Thanks in Advance

Parsoya Rakesh
