1

It's not clear whether this has more to do with port collision or something related to "X protocol" and perhaps disabling "X protocol" or changing its welcome message.


Might this error indicate a port collision? As:

Functionality Added or Changed

Important Change: Attempting to connect to an X Protocol port, 33060 by default, using the classic MySQL protocol resulted in the 

following error: ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

This was because of differences in X Protocol and classic MySQL protocol clients expectations on how connections were initialized. 

Now, in such a situation the generated error message is ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10. If you encounter this error then you are probably trying to use the wrong port for the protocol your client is using.

The alice and bob containers were created using docker, both are from the default mysql-server image on docker hub. I'm trying to connect from alice to bob using the MySQL console.

Logged into alice from the host, after installing iputils and telnet with yum:

bash-4.2# bash-4.2# ping bob PING bob (172.21.0.3) 56(84) bytes of data. 64 bytes from bob.foo (172.21.0.3): icmp_seq=1 ttl=64 time=0.064 ms 64 bytes from bob.foo (172.21.0.3): icmp_seq=2 ttl=64 time=0.084 ms 64 bytes from bob.foo (172.21.0.3): icmp_seq=3 ttl=64 time=0.086 ms ^C --- bob ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2047ms rtt min/avg/max/mdev = 0.064/0.078/0.086/0.009 ms bash-4.2# bash-4.2# telnet bob Trying 172.21.0.3... telnet: connect to address 172.21.0.3: Connection refused bash-4.2# bash-4.2# telnet bob 33060 Trying 172.21.0.3... Connected to bob. Escape character is '^]'. �^CConnection closed by foreign host. bash-4.2# bash-4.2# telnet bob 3306 Trying 172.21.0.3... Connected to bob. Escape character is '^]'. CHost '172.21.0.2' is not allowed to connect to this MySQL serverConnection closed by foreign host. bash-4.2# bash-4.2# mysql mysql -h bob -P 33060 --protocol=tcp -u root -p Enter password: ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10 bash-4.2# 

How do I update the client version to 11? From alice:

bash-4.2# bash-4.2# rpm -qa | grep mysql mysql80-community-release-el7-3.noarch mysql-shell-8.0.21-1.el7.x86_64 mysql-community-minimal-release-el7-1.noarch mysql-community-server-minimal-8.0.21-1.el7.x86_64 bash-4.2# 

and bob should be the same.

Or, is this a security precaution?


I tried again, specifying different ports but with the same error.

see also:

https://forums.mysql.com/read.php?152,684386,686543#msg-686543

1 Answer 1

1

Make sure nothing else is running on that port. So stop mysql, and see if you can still get the same error. If so, something else is running on the port you try to use.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.