2013年10月18日 星期五

[How to] Found invalid password for user : 'root@localhost'; Igonring user

Today I encounter a Mysql accessing problem.  When I tried to access mysql database with local root server, it claims

the password is invalid, so it will igonor user.   After googling, I found it was caused by using 'plaintext password' for 

this user.  To resolve this problem, we can update with correct one.


1. Access Mysql, please use anyone method you can to access the mysql database;

  1)use the other valid mysql account 

  2)stop mysql and start it with skip grant table

   #/etc/init.d/mysql stop

   #mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

2.update user password;

 [mysql]>use mysql;

[mysql]> select  * from user;

[mysql]> update user set PASSWORD=PASSWORD('your password') where USER='root' and Host='xxxx';

[mysql]>FLUSH PRIVILEGES;

** get your hash password from mysql

----[mysql]> select password('your password')

** safe update mode

----[mysql]> SET SQL_SAFE_UPDATES=0;

沒有留言:

如何下載Facebook 相簿跟影片

影片:透過chrome plug-in : Video Downloader for Facebook<sup>TM</sup> 相簿: 透過chrome plug-in : Tampermonkey 搭配script : Facebo...