<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#6600cc">
Johnny Hughes wrote:
<blockquote cite="mid1148124790.11051.251.camel@myth.home.local"
 type="cite">
  <pre wrap="">On Fri, 2006-05-19 at 23:23 -0400, <a class="moz-txt-link-abbreviated" href="mailto:kenkensmile@netscape.net">kenkensmile@netscape.net</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi all,

I am having a problem with mysql. I set up root password

set password for root@localhost=password('xxxxxxxxx');
set password for root@'xxx.yyyy.com'=password('yyyyyyyy');

after that I tried to log in, but mysql says

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using 
password: YES)
I guess that I had the right password.

My friend told me that I might have used a wrong password, so I set up 
new password for root.
However, mysql says the exactly same thing!!
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using 
password: YES)

I was not sure about the error, so I decided to remove mysql and 
deleted /var/lib/mysql.
After that I reinstalled mysql and set up mysql again.
However, mysql again says
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using 
password: YES)
I am 100000% sure that I am using the right passward for root

I am quite puzzled by the error and need your help.
Does anyone know how I can fix this problem?
I am using CentOS4.3. Thank you for your help.

    </pre>
  </blockquote>
  <pre wrap=""><!---->
OK ... another thing that I see frequently when dealing with this issue
is the location of localhost in your /etc/hosts file ... don't ask me
why, but it sometimes matters.  Put the localhost name first in the
line, like this:


127.0.0.1 localhost xxxxx yyyy.yyy


(where xxxxx and yyyy.yyy are the other names currently on the loopback
line)

_OR_

use the first name in the /etc/hosts in the 127.0.0.1 line as the @
machine name.

The first field after the IP address is name .. the others are aliases.
MySQL seems to have issues with aliases sometimes.

At least, that is my observation ...


  </pre>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
CentOS mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS@centos.org">CentOS@centos.org</a>
<a class="moz-txt-link-freetext" href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a>
  </pre>
</blockquote>
<small><font face="Verdana">I ran into this problem before. MySQL 4.1
and up uses an authentication protocol based on a password hashing
algorithm that is incompatible with that used by older clients. So
depending on your application and your MySQL version, you might have to
use the OLD_PASSWORD command to set passwords.<br>
<br>
Read more about it here:
<a class="moz-txt-link-freetext" href="http://dev.mysql.com/doc/refman/4.1/en/old-client.html">http://dev.mysql.com/doc/refman/4.1/en/old-client.html</a></font></small><br>
</body>
</html>