Forum: Ruby on Rails Insertion failed in remote database

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Trupti B. (Guest)
on 2007-01-23 14:47
I am trying to connect to remote MySQL server through rails. It is able
to create table through db:migrate. but it gives following error
can not  connect to local mysql server through socket

while inserting data. we are trying to insert data through rhtml form .



  def r_save
        @sub = = params[:sub][:name]


plz. help me to solve the query..
we have made necessary correction in database.yml
Jason N. (Guest)
on 2007-01-23 18:13
(Received via mailing list)
Are you using a different connection in config/database.yml? If you're
trying to connect to a local database, it means that the host is set to
localhost. Make sure that all of your connection settings are correct in
your database config. If you think they are all correct, post the
contents of that file here.
This topic is locked and can not be replied to.