问题描述
我无法远程连接 MySQL 服务器.连接似乎没问题,因为使用 telnet [ip] [port] 我得到响应:
4.1.3b-beta-nt-max▒I am not able to connect a MySQL server remotely.The connection seems to be ok because with telnet [ip] [port] I get response:
4.1.3b-beta-nt-max▒ <0v '[uZ,? B {efSLa $, Q4N当由命令行或 MySQL Workbench 6.3 执行时 mysql -u [用户] -p -h [主机]
When executed by command line or by MySQL Workbench 6.3
mysql -u [user] -p -h [host]我遇到了同样的错误:
错误 2027 (HY000):数据包格式错误推荐答案
这是一个 mysql 客户端错误,我已经搜索过了,这是一个旧的身份验证切换请求.您的客户端已过时,使用旧协议通信,现在,如果它也是工作台问题,您也只是客户端,则需要先更新或降级 MySQL 客户端,然后尝试单独运行.
It is a mysql client bug, I've searched about it and it is a old auth switch request. Your client it is out of date, using a old protocol communication, now, if it is a Workbench problem too your just the Client, you need to update or downgrade the MySQL Client first and try to run it alone.
这里是同一个问题,有更完整的答案:https://dba.stackexchange.com/questions/135343/server-responds-with-empty-packet-during-session-negotiation-resulting-in-client
Here, it is the same question with a more complete answer:https://dba.stackexchange.com/questions/135343/server-responds-with-empty-packet-during-session-negotiation-resulting-in-client
而且,对于新的 Auth 协议,在连接阶段:https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase.html
And, for the new Auth protocol, on connection phase:https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase.html
这篇关于MySQL:错误 2027 (HY000):格式错误的数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!