MySQL password

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Thu Jun 17 13:06:25 UTC 2010


R Kimber wrote:
> In my 10.04 logs logcheck tells me I have the following:
> 
> mysqld[14731]: PLEASE REMEMBER TO SET A PASSWORD
> FOR THE MySQL root USER !
> 
> mysqld[14731]: To do so, start the server, then issue the following
> commands:
> mysqld[14731]: /usr/bin/mysqladmin -u root password 'new-password'
> mysqld[14731]: /usr/bin/mysqladmin -u root -h infinity password
> 'new-password'
> 
> /usr/sbin/mysqld is running
> When I try /usr/bin/mysqladmin -u root password newpassword-that-isn't-NO
> I get:-
> /usr/bin/mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user 'root'@'localhost' (using password: NO)'

The (using password: NO) is just mysql telling you that you didn't try
to supply the current password on the command-line using the -p option.

The "Access denied for user 'root'@'localhost'" seems to indicate at
least that you're trying as the correct user.

The only reason I can think of for it to deny access is that there is in
fact already a password. I don't know how ubuntu configures mysql but I
did find this page
<http://www.ubuntugeek.com/reset-the-root-password-on-mysql.html> which
explains about the ‘debian-sys-maint’ and its password in
/etc/mysql/debian.cnf and that all seems to work on my machine, so you
could try that.

Cheers, Dave

PS nb that the mysql root user is not the same as the linux root user.
They are two completely independent concepts.




More information about the ubuntu-users mailing list