Always access denied when attempting to tunnel into MySQL
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?
2 Replies
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.
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 (
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.