1

I am unable to access mysqladmin on an Ubuntu server. I have tried these 3 commands and they all fail.

  1. ec2-consistent-snapshot
  2. mysqladmin -u root password 'password'
  3. /usr/bin/mysqladmin -u root password 'password'

Error message:

/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

I can access via phpMyAdmin using root & password.
netstat -an returns a listening port

 127.0.0.1:3306          0.0.0.0:*               LISTEN  

I have also restarted the mysql service but that hasn't changed anything.

How can I fix this?

1 Answer 1

2

Your syntax is off. You're actually trying to connect to the database 'password'.

Use -u <username> -p'<password>' <database>

1
  • Embarrassing on both accounts - #2 & #3 had improper syntax - duh. Issue #1 had the .my.cnf file in the wrong location! Too much work today.
    – csi
    Jun 19, 2013 at 23:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .