About the Windows Server 2012R2 server problem (mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentica)

1. Problem description:

Putting the local project code on the server today, the error message displayed on TP5 is as follows:

mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication.

Reason analysis: The error is obviously caused by the database. When the error message is pasted into Baidu, the answer is found. The reason for this error is that the local database and the server's database version are different. The server's higher version password hashes are 41-bit hashes, and the local database password hashes are 16-bit hashes. Therefore, when the server-side code connects to the database An error message will be displayed.


2. Solutions

Since the problem lies in the inconsistent password hashes of the database, then adjust the hashes to be consistent. I use Alibaba's database, the server is Tencent Cloud's Windows Server 2012R2, and the project code is deployed on the Tencent Cloud server. Therefore, the password hashes of Alibaba Cloud's database can be changed to 41 digits. The details are shown in Figure 2-1 below.



3. Achieve results

Execute the project code again, the previous error message is gone, and the database is successfully connected to obtain the corresponding data.

                                                                                                                                                                                                                                                                   ——KAI


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324736249&siteId=291194637