Hi everyone, I run into a problem after deploying my app to prod env on a Apache server with Passenger and MySQL5. The application works nearly fine, the only problem is that any select statements do not work on the database. For example if a user registers the app creates a new user entity in the user table. So creating entities does work good. But if I do a "User.find(1)" I get a nil back. And this happens at the complete app. Any find methtod (Select Statement) does work. Do anybody has an idea? I thought it is the encoding and I switched the mysql db and the app to UTF8 but it didn''t help. Thanks in advance. Regards Adam -- Posted via http://www.ruby-forum.com/.
Perhaps you should look up at the database user priviledges that you have. Thanks & Regards, Dhruva Sagar. Marie von Ebner-Eschenbach<http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html> - "Even a stopped clock is right twice a day." On Wed, Oct 14, 2009 at 12:27 PM, Adam Meyer < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi everyone, > > I run into a problem after deploying my app to prod env on a Apache > server with Passenger and MySQL5. > > The application works nearly fine, the only problem is that any select > statements do not work on the database. For example if a user registers > the app creates a new user entity in the user table. So creating > entities does work good. But if I do a "User.find(1)" I get a nil back. > And this happens at the complete app. Any find methtod (Select > Statement) does work. > > Do anybody has an idea? > I thought it is the encoding and I switched the mysql db and the app to > UTF8 but it didn''t help. > > Thanks in advance. > > Regards > > Adam > -- > 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 -~----------~----~----~----~------~----~------~--~---
Dhruva Sagar wrote:> Perhaps you should look up at the database user priviledges that you > have. > Thanks & Regards, > Dhruva Sagar. > > > Marie von > Ebner-Eschenbach<http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html> > - "Even a stopped clock is right twice a day." > > On Wed, Oct 14, 2009 at 12:27 PM, Adam Meyer <Hey Dhruva, thanks for your reply. But it does not help. I used this HowTo to configure it. http://wiki.rubyonrails.org/database-support/mysql Even if I insert the root account information for the MySQL into the database.yml it does not work. :( -- Posted via http://www.ruby-forum.com/.
No, what I meant was to check for the permissions of the database user from the database configurations.Not from rails side. From mysql there might be some configuration errors, some missing grant''s or something, if you can''t directly access those permission settings from some cpanel or something then you might need to contact your hosting support. This doesn''t seem to be a problem from rails side in my knowledge. Thanks & Regards, Dhruva Sagar. Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html> - "If God had wanted man to play soccer, he wouldn''t have given us arms." On Wed, Oct 14, 2009 at 12:46 PM, Adam Meyer < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Dhruva Sagar wrote: > > Perhaps you should look up at the database user priviledges that you > > have. > > Thanks & Regards, > > Dhruva Sagar. > > > > > > Marie von > > Ebner-Eschenbach< > http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html> > > - "Even a stopped clock is right twice a day." > > > > On Wed, Oct 14, 2009 at 12:27 PM, Adam Meyer < > > Hey Dhruva, > > thanks for your reply. But it does not help. > I used this HowTo to configure it. > > http://wiki.rubyonrails.org/database-support/mysql > > Even if I insert the root account information for the MySQL into the > database.yml it does not work. > > :( > -- > 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 -~----------~----~----~----~------~----~------~--~---
Dhruva Sagar wrote:> No, what I meant was to check for the permissions of the database user > from > the database configurations.Not from rails side. From mysql there might > be > some configuration errors, some missing grant''s or something, if you > can''t > directly access those permission settings from some cpanel or something > then > you might need to contact your hosting support. > > This doesn''t seem to be a problem from rails side in my knowledge. > > Thanks & Regards, > Dhruva Sagar. > > > Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html> > - > "If God had wanted man to play soccer, he wouldn''t have given us arms." > > On Wed, Oct 14, 2009 at 12:46 PM, Adam Meyer <Yes, I know. I installed and configured the Production Server on my own. I set the grantt''s as it is shown in this HowTo: CREATE DATABASE your_database_development; $ GRANT ALL PRIVILEGES ON your_database_development.* TO ''your-non-root-user''@''localhost'' IDENTIFIED BY ''your-non-root-password''; Obviously with my specific parts. It''s really unbelivable. -- Posted via http://www.ruby-forum.com/.
On Wed, Oct 14, 2009 at 12:28 AM, Adam Meyer < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Dhruva Sagar wrote: > > No, what I meant was to check for the permissions of the database user > > from > > the database configurations.Not from rails side. From mysql there might > > be > > some configuration errors, some missing grant''s or something, if you > > can''t > > directly access those permission settings from some cpanel or something > > then > > you might need to contact your hosting support. > > > > This doesn''t seem to be a problem from rails side in my knowledge. > > > > Thanks & Regards, > > Dhruva Sagar. > > > > > > Mike Ditka <http://www.brainyquote.com/quotes/authors/m/mike_ditka.html> > > - > > "If God had wanted man to play soccer, he wouldn''t have given us arms." > > > > On Wed, Oct 14, 2009 at 12:46 PM, Adam Meyer < > > Yes, I know. I installed and configured the Production Server on my own. > I set the grantt''s as it is shown in this HowTo: > > CREATE DATABASE your_database_development; > $ GRANT ALL PRIVILEGES ON your_database_development.* TO > ''your-non-root-user''@''localhost'' IDENTIFIED BY > ''your-non-root-password''; > > Obviously with my specific parts. > It''s really unbelivable. >What happens when you attempt to access the database via the MySQL client program? For example mysql -u your-non-root-user -p your-non-root-password your_database_development After connecting, try doing something like the following: select * from <some-table-name> -Conrad> -- > 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 -~----------~----~----~----~------~----~------~--~---
Conrad Taylor wrote:> On Wed, Oct 14, 2009 at 12:28 AM, Adam Meyer < > rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> > you might need to contact your hosting support. >> > >> Obviously with my specific parts. >> It''s really unbelivable. >> > > What happens when you attempt to access the database via the MySQL > client > program? For example > > mysql -u your-non-root-user -p your-non-root-password > your_database_development > > After connecting, try doing something like the following: > > select * from <some-table-name> > > -ConradHey Conrad, I am at work now. Check it out when at home and come back to you. Cheers -- Posted via http://www.ruby-forum.com/.