mysql : Access denied for user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



kenkensmile@xxxxxxxxxxxx wrote:
> 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');

Mysql passwords are a mantrap pit full of sharpened stakes and lizards.

I don't claim to understand the system, but I have three pieces of 
advice that get me out of the deathpit:

  - you MUST do

flush privileges;

after messing with the privs or your messing is ignored until you 
restart mysqld.

  - There are two kinds of password hashes in use, and they are 
incompatible!!!  IIRC password() makes the new kind and OLD_PASSWORD() 
makes the older kind.  Depending on the age of the client you are using 
to connect, it will hash your password one way or the other.

  - The privilege tables are done as database tables.

use mysql;
show tables;

will get you started.  God help me I found it easier to mess with the 
privilege tables directly -- don't forget the flush -- than use the sql 
syntax.

Oh one more ... tables themselves have privileges separate from the 
general login, but I don't think that's the problem here from the error.

-Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4492 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.centos.org/pipermail/centos/attachments/20060520/734d53a5/smime.bin

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux