On my RoR server (which I don''t have root access to) there are two instances of mysql (4.0.x and 5.0.x). My database has been created in the 5.0.x instance - I can log in manually OK (so I''ve got the correct username and passowrd) but my RoR keeps getting denied access. /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:523:in `read'': Access denied for user: ''tobyr@localhost'' (Using password: YES) (Mysql::Error) I think it may be a path issue - what do I need to do to point Ruby at the right instance of mysql? I assume it is config/database.yaml but I''m not sure what to add or change. thanks in advance -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 8 Nov 2007, at 17:52, Toby Rodwell wrote:> > On my RoR server (which I don''t have root access to) there are two > instances of mysql (4.0.x and 5.0.x). My database has been created in > the 5.0.x instance - I can log in manually OK (so I''ve got the correct > username and passowrd) but my RoR keeps getting denied access. > > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ > active_record/vendor/mysql.rb:523:in > `read'': Access denied for user: ''tobyr@localhost'' (Using password: > YES) > (Mysql::Error) > > I think it may be a path issue - what do I need to do to point > Ruby at > the right instance of mysql? I assume it is config/database.yaml but > I''m not sure what to add or change. >It''s going to either be the port on which you connect to the mysql server or the path to the socket file. Fred> thanks in advance > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
when you say you can log in locally what are you using to log in. command line mysql or a client like cocoamysql? try using tobyr as username and 127.0.0.1 as host instead of localhost On 9/11/2007, at 6:52 AM, Toby Rodwell wrote:> > On my RoR server (which I don''t have root access to) there are two > instances of mysql (4.0.x and 5.0.x). My database has been created in > the 5.0.x instance - I can log in manually OK (so I''ve got the correct > username and passowrd) but my RoR keeps getting denied access. > > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ > active_record/vendor/mysql.rb:523:in > `read'': Access denied for user: ''tobyr@localhost'' (Using password: > YES) > (Mysql::Error) > > I think it may be a path issue - what do I need to do to point > Ruby at > the right instance of mysql? I assume it is config/database.yaml but > I''m not sure what to add or change. > > thanks in advance > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Fred, Sounds promising - how do I tell Ruby which port to use? (There appears to be just one ''mysql.sock'', in /tmp/mysl.sock, and that''s what the database.yaml is already pointing at). /toby Frederick Cheung wrote:> On 8 Nov 2007, at 17:52, Toby Rodwell wrote: > >> (Mysql::Error) >> >> I think it may be a path issue - what do I need to do to point >> Ruby at >> the right instance of mysql? I assume it is config/database.yaml but >> I''m not sure what to add or change. >> > It''s going to either be the port on which you connect to the mysql > server or the path to the socket file. > > Fred-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Adam, It''s the CLI that works: bash-2.05$ /usr/local/mysql-5.0.22/bin/mysql -u tobyr -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 41 to server version: 5.0.22-log Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer. mysql> ... Tried with "host: 127.0.0.1" but no joy. Thanks for the suggestion though. /toby Adam Jones wrote:> when you say you can log in locally what are you using to log in. > command line mysql or a client like cocoamysql? > try using tobyr as username and 127.0.0.1 as host instead of localhost-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
OK, I found the "port: XXXX" config setting, but unfortunately it didn''t fix the problem. The strange thing is, *regardless* of the port setting I seem to get the same error message - I would have assumed that using a bogus port number would give a different error message ... regards Toby Toby Rodwell wrote:> Hi Fred, > Sounds promising - how do I tell Ruby which port to use? (There > appears to be just one ''mysql.sock'', in /tmp/mysl.sock, and that''s what > the database.yaml is already pointing at). > > /toby > > Frederick Cheung wrote: >> On 8 Nov 2007, at 17:52, Toby Rodwell wrote: >> >>> (Mysql::Error) >>> >>> I think it may be a path issue - what do I need to do to point >>> Ruby at >>> the right instance of mysql? I assume it is config/database.yaml but >>> I''m not sure what to add or change. >>> >> It''s going to either be the port on which you connect to the mysql >> server or the path to the socket file. >> >> Fred-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---