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;

沒有留言:

Obsidian 插件介紹:Text Generator

Text Generator 是 Obsidian 的一個插件,它可以根據給定的提示自動生成文本。這個插件使用 GPT-3 語言模型,能夠產生類似人類的文本,非常適合編寫故事、文章、電子郵件和其他類型文本。 主要功能: **生成文本:**根據提示生成各種長度的...