dte49889 2015-10-31 10:01
浏览 71

“无法使用旧的不安全身份验证进行连接”但我没有旧密码?

Standard error with no solution for my own case:

mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password').

This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file [2000]

I have googled enough, trying different advices, but I still don't know what to try now, because I do such a query in MySQLManager:

SELECT LENGTH(Password) FROM mysql.user;
show variables like 'old_passwords';

and I got such a answer:

LENGTH(Password)
41
41
41
old_passwords: OFF

It seems to be right hash method for passwords (not 16), right old_password value (OFF), but I can't fix the error and even don't know what more I should try. I use OpenServer 5.2.2, with:

DB Server:

  • Server: 127.0.0.1 via TCP/IP
  • Server type: MySQL
  • Server version: 5.5.45 - MySQL Community Server (GPL)
  • Protocol version: 10
  • User: max@localhost
  • Server coding: UTF-8 Unicode (utf8)

Web-Server:

  • Apache/2.2.31 (Win32)
  • Version client DB: libmysql - mysqlnd 5.0.8-dev - 20102224
  • PHP extension: mysqli

UPD: Can old-version php code encrypt password in old 16-bit code? Maybe this is the reason?

  • 写回答

1条回答 默认 最新

  • duanhuan1147 2015-11-02 09:46
    关注

    Not solved, but got round - I've done export DB from site source DB with unchecked option "save binary fields in hexadecimal", downloaded new version of php site - then wrote right user and password, and all worked properly

    评论

报告相同问题?

悬赏问题

  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失