Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Aug 22, 2010 7:48 pm 
Offline
Senior Newbie

Joined: Sun Aug 22, 2010 7:41 pm
Posts: 13
Whenever I try to connect to MySQL through SSH I get the following error:

Code:
SQL Error (1045): Access denied for user 'root'@'localhost' (using password: YES)


I know that the username and password are correct. In the user table both "localhost" and "127.0.0.1" are allowed as hosts for root and the error message says it sees me as "localhost" so that shouldn't be the problem.

Right now my my.cnf is basically a copy of my-medium.cnf. I've tried all kinds of combinations of skip-networking and bind-address with no success. Could it be a problem in sshd_config?


Top
   
 Post subject:
PostPosted: Mon Aug 23, 2010 3:01 am 
Offline
Senior Newbie

Joined: Wed Aug 18, 2010 1:31 am
Posts: 13
Any weird characters in your password?

Not even necessarily 'weird' in terms of being whitespace or anything, difference between the terminal and remote character sequences could be giving you grief?

I've seen it happen before when we had a password that worked when copy/pasted but not when typed, was also MySQL, in that case over ssh in OSX terminal.

Options in PuTTY or whatever client you're using might allow you to find a way around it, but if you're after a quick fix a test of a plain alphanumeric ASCII password is probably a good way to start. :)


Top
   
 Post subject:
PostPosted: Mon Aug 23, 2010 10:02 am 
Offline
Senior Newbie

Joined: Sun Aug 22, 2010 7:41 pm
Posts: 13
This only took 10 seconds to fix after some sleep. HeidiSQL has two tabs; one for the MySQL login and another for SSH. Someone how I missed that the SSH tab was still set to localhost and I was connecting to myself.

For some reason I do need bind-address explicitly set to 127.0.0.1 (or 0.0.0.0) in order to connect, even though the MySQL docs say that the default is to listen on all devices it doesn't seem to work (http://dev.mysql.com/doc/refman/5.0/en/ ... nd-address).

Also despite conflicting info skip-networking does need to be commented out/disabled/set to 0. I doubt this is a security risk though if bind-address is set to 127.0.0.1.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group