Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm telling mysql to prompt for a password but it won't acknowledge it:

mysql -h xxxxxx.xxxxxx.us-east-1.rds.amazonaws.com -P 3306 -u root –p

response: Access denied for user 'root@%'@'10.10.1.1' (using password: NO)

Even when I explicitly pass the password in the connection string I get the same response:

mysql -h xxxxxx.xxxxxx.us-east-1.rds.amazonaws.com -P 3306 -u root –pMyPassword

response: Access denied for user 'root@%'@'10.10.1.1' (using password: NO)

What is causing this?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You have wrong character in front of p, try to delete that character and replace it with -, you can also try using following --password=XXX, and lastly -P 3306 isn't needed unless you're using NON-standard port.

share|improve this answer
    
You just gotta hate those annoying unicode hyphens. –  Zoredache Jul 17 at 16:25
    
heh, just don't copy and paste)) –  alexus Jul 17 at 16:28
    
...How did it even occur to you to check this? +1 for (I assume) looking at the bytecode of his command line. –  Parthian Shot Jul 17 at 16:49
    
@parthianshot sorry to disappoint you, but I didn't look at bytecode to see it(. I just copy & paste it to my terminal, removed -h and hit enter, my answer was right there as it threats that part as name for database therefore no -p. –  alexus Jul 17 at 16:54
    
@alexus Aww... Well, still solid debugging in any case. –  Parthian Shot Jul 17 at 16:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.