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.
Trupti Bhatt wrote:> 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 .
>
> i.e.
>
> controller
>
> SubController
> def r_save
> @sub = Sub.new
> @sub.name = params[:sub][:name]
> end
> @sub.save
>
>
> end
>
> plz. help me to solve the query..
> we have made necessary correction in database.yml
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---