# Database access problem in different servers

**URL:** <https://www.ruby-forum.com/t/database-access-problem-in-different-servers/180312>\
**Category:** Rails\
**Created:** [December 17, 2009, 7:15am UTC](https://www.ruby-forum.com/t/database-access-problem-in-different-servers/180312 "2009-12-17T07:15:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmanivannancse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Post date:** [December 17, 2009, 7:15am UTC](https://www.ruby-forum.com/t/database-access-problem-in-different-servers/180312/1 "2009-12-17T07:15:11Z")

</div>

```
 i have two machines are called mpfslice1, mpfslice2. The two slices

```

are in different location.  
mpfslice1 have weekrep\_dev database and rails project called weekreport.  
If weekreport connects with weekrep\_dev database and it is working fine.

mpfslice2 have another rails project called monthreport.but mpfslice2  
haven’t database… So i want to connect weekrep\_dev(mpfslic1) database  
for monthreport project in mpfslice2.

I couldn’t access the database weekrep\_dev(mpfslic1) though i have  
provided right infomation in monthreport’s database.yml.

i got some informations from articles,In that article the pointed out  
the followings,

1)if u want to access database from one machine to another, you should  
open database port…and then try with database.yml.  
but i am sure i cant able to open the port.

2)try with Web request and response between two slice ie… write  
webservice in mpfslice1.  
send request for model resultset from mpfslice2 to mpfslice1 and get  
response.

But still i don have the clear ideas about this.please help me and give  
me a sloution as well as some suggestions for  
this problem.
