gkaykck
2011-Mar-18 14:16 UTC
rake tool tries to connect to wrong ip address for migration
I have asked a question similar, but not same. I was unable to connect to my remote mysql server from windows, it tries to connect to local server, whatever i wrote in database.yml din''t made any changes at all. So i ve switched to linux. Now my rails app sees what i wrote inside my database.yml and tries to connect the right ip address. But now my rake tool gets confused and tries to connect local mysql instance. I think i have to override database.yml file for rake only, but i don''t know how to do so. --- database.yml (i ve changed my host with *) development: adapter: mysql2 encoding: utf8 reconnect: false database: devel_database pool: 5 username: ''username'' password: ''password'' host: *.*.*.* test: adapter: mysql2 encoding: utf8 reconnect: false database: temp_test pool: 5 username: root password: host: *.*.*.* production: adapter: mysql2 encoding: utf8 reconnect: false database: temp_production pool: 5 username: root password: host: *.*.*.* --- database.yml gkaykck@node2:~/Dropbox/portalegitim$ rake db:migrate (in /home/gkaykck/Dropbox/portalegitim) rake aborted! Access denied for user ''username''@''78.170.46.170'' (using password: YES) (See full trace by running task with --trace) 78.170.46.170 is my computers ip not my mysql servers ip. It is different in database.yml file -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Mar-18 16:16 UTC
Re: rake tool tries to connect to wrong ip address for migration
On Mar 18, 2:16 pm, gkaykck <gkay...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > --- database.yml > > gkaykck@node2:~/Dropbox/portalegitim$ rake db:migrate > (in /home/gkaykck/Dropbox/portalegitim) > rake aborted! > Access denied for user ''username''@''78.170.46.170'' (using password: YES) > > (See full trace by running task with --trace) > > 78.170.46.170 is my computers ip not my mysql servers ip. It is different in > database.yml fileThat doesn''t mean that you were trying to connect to 78.170.46.170, it''s saying that the server refused access to the user username from the machine with ip address 78.170.46.170 Fred -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.