# Display data from remote mysql database

**URL:** <https://www.ruby-forum.com/t/display-data-from-remote-mysql-database/119835>\
**Category:** Rails\
**Created:** [November 11, 2007, 4:27am UTC](https://www.ruby-forum.com/t/display-data-from-remote-mysql-database/119835 "2007-11-11T04:27:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanderkerkoff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/7feea3/32.png) [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Post date:** [November 11, 2007, 4:27am UTC](https://www.ruby-forum.com/t/display-data-from-remote-mysql-database/119835/1 "2007-11-11T04:27:27Z")

</div>

Hi,

I’m new to Ruby on Rails and have a little problem. I currently have a  
mysql database on a separate server than the one I’m building and  
running rails apps on. Is it possible to query the remote database and  
display those results in a rails app, or am I asking for problems?

This is really the only thing I’m trying to do with rails at the moment,  
just to get me started. I know the usual approach is the build and  
manage the database with the rails app, but I don’t need to do that in  
this case.

Thanks

---

<div class="post-metadata">

**Author:** ![vanderkerkoff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/7feea3/32.png) [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Post date:** [November 11, 2007, 5:05am UTC](https://www.ruby-forum.com/t/display-data-from-remote-mysql-database/119835/2 "2007-11-11T05:05:13Z")

</div>

Thats no problem at all and is no different that connecting to the  
local database other than changing the settings in database.yml. If  
you want to conncet to multiple databases, look here:

[http://wiki.rubyonrails.org/rails/pages/HowtoUseMultipleDatabases](http://wiki.rubyonrails.org/rails/pages/HowtoUseMultipleDatabases)

-Bill

---

<div class="post-metadata">

**Author:** ![vanderkerkoff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/7feea3/32.png) [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Post date:** [November 11, 2007, 6:30am UTC](https://www.ruby-forum.com/t/display-data-from-remote-mysql-database/119835/3 "2007-11-11T06:30:10Z")

</div>

William P. wrote:

> Thats no problem at all and is no different that connecting to the  
> local database other than changing the settings in database.yml. If  
> you want to conncet to multiple databases, look here:
> 
> [http://wiki.rubyonrails.org/rails/pages/HowtoUseMultipleDatabases](http://wiki.rubyonrails.org/rails/pages/HowtoUseMultipleDatabases)
> 
> -Bill

Thanks Bill,

I’ll look into that.
