Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR 1045 (28000): Access denied for user 'root'@'localhost'

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
0
0
ES
Hi.

Using mySQL 4.1.22 on Linux, I got this error message suddenly this morning (it worked ok yesterday):
---------
[root@server]# /usr/local/mysql/bin/mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
----------

I created a '/root/root.sql' file:
--------
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('xxxxxx');
--------

And killed the process and restarted:
--------
[root@server ~]# /usr/local/mysql/bin/mysqld_safe --init-file=/root/root.sql &
[1] 2494
[root@server ~]# Starting mysqld daemon with databases from /usr/local/mysql/var
--------

But I get the same error message :(

In my '/usr/local/mysql/var/server.err' file there's no error message:
--
070220 07:03:40 mysqld started
070220 07:03:40 InnoDB: Started; log sequence number 0 3758734
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.1.22' socket: '/tmp/mysql.sock' port: 3306 Source distribution
-------

What am I doing wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top