Mysql password problems

I apologize if this question is off topic, yet I am a MySQL newbie and
haven’t found any resolution on my own. I’ve been following this
install guide

http://wiki.bestpractical.com/index.cgi?RHEL4InstallGuide

and everything seems to work except this command:

mysqladmin -u root password newpass

mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’

I’ve also tried this alternate syntax:

mysqladmin -uroot -p create

Enter password:
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: YES)’

What can I do?

Justin

This may be a dumb question, but are you sure the mysql daemon is
running?

(Something like “# ps -ef | grep mysqld” should tell you)-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Justin
Findlay
Sent: Friday, May 05, 2006 2:22 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] mysql password problems

I apologize if this question is off topic, yet I am a MySQL newbie and
haven’t found any resolution on my own. I’ve been following this
install guide

http://wiki.bestpractical.com/index.cgi?RHEL4InstallGuide

and everything seems to work except this command:

mysqladmin -u root password newpass

mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’

I’ve also tried this alternate syntax:

mysqladmin -uroot -p create

Enter password:
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: YES)’

What can I do?

Justin
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

We’re hiring! Come hack Perl for Best Practical:
http://bestpractical.com/about/jobs.html

If you haven’t explicitly set a mysql password for the root user, then
there isn’t one. Remove the ‘-p’ from command line, and if you’re
logged in as root, you shouldn’t even need the -u root…

Kelly F. Hickel
Senior Software Architect
MQSoftware, Inc
952.345.8677
kfh@mqsoftware.com

mysql -u username -pPassword

works for me. No space between -p and the password. Like an earlier
poster said. If you haven’t set a root password, there is none.

RomeoOn May 5, 2006, at 2:21 PM, Justin Findlay wrote:

I apologize if this question is off topic, yet I am a MySQL newbie and
haven’t found any resolution on my own. I’ve been following this
install guide

Request Tracker Wiki

and everything seems to work except this command:

mysqladmin -u root password newpass

mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password:
NO)’

I’ve also tried this alternate syntax:

mysqladmin -uroot -p create

Enter password:
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password:
YES)’

What can I do?

Justin


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

We’re hiring! Come hack Perl for Best Practical: http://
Careers — Best Practical Solutions

mysql -u username -pPassword

works for me. No space between -p and the password. Like an earlier
poster said. If you haven’t set a root password, there is none.

Indeed. My mistake was quite obvious once I learned of it. In
following the RHEL4InstallGuide I had copied and pasted

mysqladmin -u root password newpass

into the shell and must have forgotten about doing so, because the
password was literally ‘newpass’. (-:

Justin