Select statements do not work on MySQL

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

Perhaps you should look up at the database user priviledges that you
have.
Thanks & Regards,
Dhruva S…

Marie von
Ebner-Eschenbachhttp://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 M. <

Dhruva S. wrote:

Perhaps you should look up at the database user priviledges that you
have.
Thanks & Regards,
Dhruva S…

Marie von
Ebner-Eschenbachhttp://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 M. <

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.

:frowning:

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 S…

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 M. <

On Wed, Oct 14, 2009 at 12:28 AM, Adam M. <
[email protected]> 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

-Conrad

Dhruva S. 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 S…

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 M. <

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.

Conrad T. wrote:

On Wed, Oct 14, 2009 at 12:28 AM, Adam M. <
[email protected]> 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

-Conrad

Hey Conrad, I am at work now. Check it out when at home and come back to
you.
Cheers