Access denied for user:-

I"m getting this error
Access denied for user: ‘root@localhost’ (Using password: NO)

I’ve googled around and realize it can be any number of things. The yml file is set up correct and I can login into database through shell.

Any ideas what to try next ?

TIA
Stuart

I"m getting this error
Access denied for user: 'root@localhost' (Using password: NO)

I've googled around and realize it can be any number of things. The yml
file is set up correct and I can login into database through shell.
Any ideas what to try next ?

yml file has several setting for different environments. Are you sure
you have set
them all of them correctly? Maybe you have correct settings for, say,
development evnvironment, but try to run rails in production mode?

Regards,
Rimantas

Well they are all set for their environments. I wonder though if the SQL server needs to be rebooted.

The other thing is that it seems to be version 3.23 of MySQL , pretty old and wonder if that would effect anything ?

Stuart

        
        > I"m getting this error
        > Access denied for user: 'root@localhost' (Using password:
        NO)
        >
        > I've googled around and realize it can be any number of
        things. The yml
        > file is set up correct and I can login into database through
        shell.
        > Any ideas what to try next ?
        
        yml file has several setting for different environments. Are
        you sure
        you have set
        them all of them correctly? Maybe you have correct settings
        for, say,
        development evnvironment, but try to run rails in production
        mode?
        
        Regards,
        Rimantas
        --

Well they are all set for their environments. I wonder though if the
SQL server needs to be rebooted.

The other thing is that it seems to be version 3.23 of MySQL , pretty
old and wonder if that would effect anything ?

I"m getting this error
Access denied for user: 'root@localhost' (Using password: NO)

I've googled around and realize it can be any number of things. The
yml file is set up correct and I can login into database through
shell.
Any ideas what to try next ?

I"m getting this error
Access denied for user: ‘root@localhost’ (Using password: NO)

I’ve googled around and realize it can be any number of things. The

yml file is set up correct and I can login into database through
shell.
Any ideas what to try next ?


and by the way, once you get connected, learn to set up users/grants and
don’t allow root to connect without a password

Craig

Yep, this server I’m on is Redhat as well.
Well I don’t have root connecting to anything. I have a unique username and password which was set to grant all .
I think though at this point I’m down to either rebooting the sql server or upgrading (which will probably involve a reboot)

Stuart

Hi Stuart,

When, exactly, do you get this message? During your application’s execution? When you’re interacting with MySQL via the command line? What platform are you getting this on?

Bill

        
        > I"m getting this error
        > Access denied for user: 'root@localhost' (Using password:
        NO)
        >
        > I've googled around and realize it can be any number of
        things. The
        > yml file is set up correct and I can login into database
        through
        > shell.
        > Any ideas what to try next ?
        ----
        and by the way, once you get connected, learn to set up
        users/grants and
        don't allow root to connect without a password
        
        Craig

Yep, this server I'm on is Redhat as well.
Well I don't have root connecting to anything. I have a unique
username and password which was set to grant all .

Hi Stuart,

When, exactly, do you get this message? During your application’s execution? When you’re interacting with MySQL via the command line? What platform are you getting this on?

Bill

Hi Bill!, I get the message when I’m attempting to load a page that loads a table. I can get in command line with no problem, selects, etc.

Red Hat Linux.

Stuart

Hi Stuart,

If you can login from the shell as root without a password, then my first guess would be that you must not appear to MySQL as coming in on the localhost domain when you do that. This sounds like something you should continue to investigate and get straightened out.

Having said that…

For a quick ‘fix’, have you tried just doing a grant to that user?

grant all on database_name.* to ‘root’@‘localhost’

hth,

Bill

Hi Stuart,

If you can login from the shell as root without a password, then my first guess would be that you must not appear to MySQL as coming in on the localhost domain when you do that. This sounds like something you should continue to investigate and get straightened out.

Only if I want my application to work :slight_smile:

Having said that…

For a quick ‘fix’, have you tried just doing a grant to that user?

grant all on database_name.* to ‘root’@‘localhost’

Just tried it and same response. access denied …root@localhost…using password ‘no’

I rebooted mysql so I can confidently rule that out. Next step is to upgrade to 4.x, since Rails recommends at least 4.

Stuart

Dark Ambient wrote:

Next step is to upgrade to 4.x, since Rails recommends at least 4.

Sounds like the right next step. Let us know how it goes.

Best regards,
Bill

Will do
Stuart