Eu Reka
2008-Dec-22 19:15 UTC
''Access Denied'' - unable to load schema into production DB
I am currently stuck on how to proceed. This app is hosted on site5. mysql version 4.1 I believe. I posted this on their forums, and also on mysql forums. Is anyone able to confirm whether it''s a rails issue or not, or mysql, or something with the web hosting server. I can''t load my schema into my rails production DB. I''m hoping this is a simple problem. - I Created mysql database called batman_production. - I Created a user Joker with ALL privileges granted to batman_production. - I can log into mysql with -u Joker and the correct password. I can see ''batman_production'' when I type ''show databases;''. - I then exit mysql and go into my rails app folder and run: ''rake db:schema:load RAILS_ENV=production''. I then get ''Access denied for user ''Joker''@''localhost'' to database ''batman_production''. I double-checked the database.yml file and it has Joker''s credentials. Any suggestions on where to proceed from here? Thank you! -- 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 -~----------~----~----~----~------~----~------~--~---
Hassan Schroeder
2008-Dec-22 19:45 UTC
Re: ''Access Denied'' - unable to load schema into production DB
On Mon, Dec 22, 2008 at 11:15 AM, Eu Reka <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I am currently stuck on how to proceed. This app is hosted on site5. > mysql version 4.1 I believe.> ''rake db:schema:load RAILS_ENV=production''. I then get ''Access denied > for user ''Joker''@''localhost'' to database ''batman_production''. > > I double-checked the database.yml file and it has Joker''s credentials.My immediate WAG would be password length discrepancy: Note this from the old mysql-default-database.yml -- # And be sure to use new-style password hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html Now on your production system, log into mysql and enter mysql> show variables like ''%pass%''; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | old_passwords | OFF | +---------------+-------+ 1 row in set (0.07 sec) mysql> If that says ON, you have an issue :-) FWIW, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Eu Reka
2008-Dec-23 00:34 UTC
Re: ''Access Denied'' - unable to load schema into production DB
Hassan Schroeder wrote:> On Mon, Dec 22, 2008 at 11:15 AM, Eu Reka > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> If that says ON, you have an issue :-)Thanks for your reply. I ran the command you suggested and it''s set to off: mysql> show variables like ''%pass%''; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | old_passwords | OFF | +---------------+-------+ 1 row in set (0.00 sec) -- 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 -~----------~----~----~----~------~----~------~--~---
Eu Reka
2008-Dec-23 00:57 UTC
Re: ''Access Denied'' - unable to load schema into production DB
I managed to solve the problem. It seems my database.yml was missing two characters in the database name in both production and development. The host I am using automatically adds a prefix to both database name and user name. Once I corrected the names in my database.yml, recreated the user, and re-granted permissions, I was able to complete the migration. -- 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 -~----------~----~----~----~------~----~------~--~---