我正在尝试连接到内置于物理设备中的数据库,并且我不想更改此 mysql 服务器的任何配置。
当我尝试连接时,出现以下错误:
Traceback (most recent call last):
File "connect3031.py", line 3, in <module>
cnx = mysql.connector.connect(user='..', database='...', password='...', host='192.168.88.100')
File "/usr/lib/pymodules/python2.7/mysql/connector/__init__.py", line 45, in Connect
return MySQLConnection(*args, **kwargs)
File "/usr/lib/pymodules/python2.7/mysql/connector/connection.py", line 366, in __init__
self.connect(*args, **kwargs)
File "/usr/lib/pymodules/python2.7/mysql/connector/connection.py", line 411, in connect
ssl=(ssl_ca, ssl_cert, ssl_key))
File "/usr/lib/pymodules/python2.7/mysql/connector/connection.py", line 449, in _open_connection
self._charset)
File "/usr/lib/pymodules/python2.7/mysql/connector/protocol.py", line 350, in do_auth
"Authentication with old (insecure) passwords "\
mysql.connector.errors.NotSupportedError: Authentication with old (insecure) passwords is not supported: http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html
此类问题的典型响应是,例如,此处mysqlnd 无法使用旧的不安全身份验证连接到 MySQL 4.1+,但是我不想触摸此服务器(除了选择数据),因此更新用户是不可能的。
有什么方法可以配置客户端,使其接受这些旧的不安全密码。我真的不关心安全性,因为它将通过 VPN 访问,并且所有密码本质上都是常识,因为它们打印在手册中。
有问题的服务器是(无论如何这就是mysqldump
告诉我的:
Server version 4.1.7-max