The default for mysql clients is to connect with no password. Your first command connects with no password, and sends commands to change the password. Don't confuse the parameters you're sending with the ones you're supposed to send to connect with a password.
To connect with a password, pass "-p" on the command line to have the client prompt for the password, or do the longopt "--password=MYPASSWORD"
eg
$ mysqladmin -u root -p somecommand somearg Enter password:
or
$ mysqladmin -u root --password='abc123' somecommand somearg
Sean
On Tue, Mar 16, 2010 at 12:56 PM, Raymond J. Henry rayhenry@autoclubs.ca wrote:
OK, I’ve come to the conclusion that I’m doing something wrong, but can’t for the life of me figure out what it is. Going over and over and over documentation, I must be interpreting something wrong, because I think I’m doing what it says.
I’m setting up a new box with CentOS. Installed MySQL, and it’s running. Now I get to setting the password. Here’s the issue.
I start with:
mysqladmin -u root password SQLROOTPASSWD.
No problem
Then I try:
mysqladmin -h myserver.mydomain.com -u root password SQLROOTPASSWD.
This is where things go South. I get the response
mysqladmin: connect to server at ‘(my server)’ failed
“Access denied for user ‘root’@’192.168.1.160’ (using password: NO)’
I’m at a loss. Hours of fighting with this, and I’m nowhere….. Help?
Roundtable mailing list Roundtable@muug.mb.ca http://www.muug.mb.ca/mailman/listinfo/roundtable