我需要一个旧的MySQL客户端(4.1)连接到更老的MySQL服务器(3.23)。
目标是将Java / JDBC连接到旧的Linux / MySQL 3.23数据库,以便更新Lucene搜索的文本信息(也将在linuxdev2上运行)。
问题是我无法从远程Linux / MySql 4.1客户端连接到Linux / MySQL 3.23服务器。我无法从JDBC连接;我无法从“mysql”连接:
LOCAL (intranet):
mysql -uSOMEUSER -pSOMEPASSWORD mysql => OK
REMOTE (from linuxdev2):
mysql -uSOMEUSER -pSOMEPASSWORD -hintranet mysql => FAILS:
ERROR 1045 (00000): Access denied for user: 'SOMEUSER@linuxdev2' (Using password: YES)
PERMISSIONS (on intranet):
mysql> select User,Host,Password from user order by User;
+-----------+-----------------------------+------------------+
| User | Host | Password |
+-----------+-----------------------------+------------------+
| SOMEUSER | % | 233780be35015f2c |
| SOMEUSER | localhost | 233780be35015f2c |
| ...
这些是主持人:
Component Intranet: Linuxdev2:
--------- -------- ---------
Java N/A Sun Java 1.5.0_03
JDBC N/A mysql-connector-java-3.1.6-3
MySQl Server mysql-server-3.23.22-6 mysql-4.1.10a-3.8
MySql Client mysql-3.23.22-6 mysql-client-4.1.10a-3
我采用了Ethereal跟踪并验证了从linuxdev2到Intranet的TCP / IP连接是否正常:
a) They connect on port 3306
b) Linuxdev2 does a "Login request Caps"
c) Intranet replies with "Response Error Code: 415" (access denied)
答案 0 :(得分:0)
MySQL的密码算法在v4.1中更改 - 相同的password()函数,但是具有不同的散列算法,因此使用password()
将v4.1 +客户端连接到较旧的v3.x服务器 - 创建的密码赢了不行。
参考:http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html