[CLUE-Tech] mysql initialization problem: access denied for user: root

Russell Glissmann rglissmann at rfgsolutions.com
Wed Apr 30 13:00:45 MDT 2003


If mysqld is running (which it seems to be) try to get into mysql as
root just by typing 'mysql' with no user or password options.  By
default the user table is setup with anonymous users, who are users with
no name.  I just replicated this on my system.  Once in there you can
change the passwords. Although the Mysql site doesn't mention this, I
would for security sake remove the anonymous users.
Check out http://www.mysql.com/doc/en/User_Account_Management.html for
more information.

Russ
On Wed, 2003-04-30 at 09:45, Young, Ed wrote:
> 
> When trying to run any mysqladmin command I get: 
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user: 'root at localhost' (Using password: NO)'
> 
> System: RH8.0
> mysql-3.23.56-1.80
> perl-DBD-MySQL-2.1017-3
> mysql-server-3.23.56-1.80
> php-mysql-4.2.2-8.0.7
> 
> I ran the install_mysql_db script to initialize it
> It started the server and set up the test database I guess. It then
> told me to set the password for the root user:
> [root at gerakina ed]# mysqladmin -u root password 'mypassword'
> [root at gerakina ed]# mysqladmin -u root -h gerakina password
> 'mypassword'
> 
> The second one didn't return for a long time and I accidentally killed
> my x session.
> 
> Now here is a sample of the errors I get when I try to run any mysql
> calls:
> [root at gerakina ed]# safe_mysqld &
> [1] 1403
> [root at gerakina ed]# Starting mysqld daemon with databases from
> /var/lib/mysql
> 
> [root at gerakina ed]# mysqladmin version
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user: 'root at localhost' (Using password: NO)'
> [root at gerakina ed]#
> 
> 
> [root at gerakina ed]# mysqladmin -u root password 'mypassword'
> mysqladmin: connect to server at 'localhost' failed
> error: 'Access denied for user: 'root at localhost' (Using password: NO)'
> [root at gerakina ed]#
> 
> 
> [root at gerakina ed]# cd /var/lib/mysql/
> [root at gerakina mysql]# ls
> Jekyll mysql mysql.sock test
> [root at gerakina mysql]#
> 
> How can I fix this? 
> 
>  Thanx.
-- 
Russell Glissmann <rglissmann at rfgsolutions.com>




More information about the clue-tech mailing list