Hi All. I have one newbie question- How do I connect to a remote MySQL server using Ruby on Rails? Is it something simple like changing a few lines in database.yml?? Thanks in advance. Lisa -- Posted via http://www.ruby-forum.com/.
add host: <remote_mysql_hostname> to the pertinent sections (developement, test, production) in database.yml. of course, make sure the user on the remote mysql database is allowed to connect remotely. On 6/27/06, lisa-u <maneneko@yahoo.com> wrote:> Hi All. > > I have one newbie question- > > How do I connect to a remote MySQL server using Ruby on Rails? Is it > something simple like changing a few lines in database.yml?? > > Thanks in advance. > > Lisa > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Wed, Jun 28, 2006 at 03:21:58AM +0200, lisa-u wrote:> How do I connect to a remote MySQL server using Ruby on Rails? Is it > something simple like changing a few lines in database.yml??Most examples set the database hostname to "localhost" - just change your to the name of the remote server. Provide the correct username and password, and make sure that you have access across the firewalls, if any. development: adapter: mysql database: dev username: dbuser password: dbuserpass host: remote.database.com