Errors caused by different new MySQL password Algorithms

Source: Internet
Author: User

The MySql4.1.7 password algorithm is different. You can make the following options:

1) Use PHP5 and php_mysqli.dll instead of the previous php_mysql.dll.

2) Change the MySql password to the original algorithm (this article introduces)

I have been using Mysql 3.23.44 before. After the official release of PHP5, I can't help it. After using PHP5 for a few days, I felt that my Mysql was too weak, so I had to upgrade my Mysql, the latest Mysql 5.0.1, hey, do not believe the database is weak.

The installation was successful. log on to mysql

G: \ Mysql \ bin> mysql-uroot

Mysql> ......

Delete some unused accounts, leaving only one root account.

Update the root password:

Mysql> update user set password = password ('Password') where host = 'localhost' and user = 'root ';

Successful!

Log out and restart the Mysql service.

Next, configure Config. inc. php of phpMyadmin.

Modify the Mysql user name and password

Open phpMyadmin and log on:

Unexpectedly, an error message is displayed:

Client does not support authentication protocol requested by server;

It seems that I had to upgrade the client. I was totally disappointed. I thought Mysql 5.0.1 was as good as 3.23.44.

Later, I used Google to search for some content in the error message and found the official Mysql website. After reading it, I understood that it was a problem with the password algorithm, because the password algorithm of Mysql version 5.0.1 is different from that of 3.23.44

Take a solution from the official website.

Mysql> SET PASSWORD
> 'Root' @ 'localhost' = OLD_PASSWORD ('newpassword ');

I am writing this article. I only hope that my friends who have the same problem can solve this problem as soon as possible.

Today, I used another method to change the password, because now I know that the previous command is used incorrectly. The old-password command is correct only when I enter it directly!

The method for today is to update mysql. user set password = old_password ('newpwd ')
Where host = 'localhost' and user = 'root ';

Then flush priviledges;

OK. log on again!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.