I'm trying to connect to MySQL
server within Vagrant's version of Laravel Homestead
, which runs MySQL 5.7
.
I never seem to had any problems with it, but on my new laptop with Catalina I'm getting the following error when trying to connect using recommended settings:
$ mysql --host=127.0.0.1 --port=33060 -uhomestead -p
Enter password:
ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10
I also tried using mysql clients (Sequel Pro
and Workbench
) with exactly same error message.
Anyone would be able to shine some light on how to resolve this issue?
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.
The error indicates that the host 10.24.96.5 that the database user is connecting from is not allowed to connect to the MySQL server. In this case, we have to make some changes to the database server to enable the user to connect remotely.
ubuntu - MySQL ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10 - Unix & Linux Stack Exchange 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.
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
In my case, changing my host from 127.0.0.1
to localhost
fixed it.
On running homestead up, I got
Fixed port collision for 3306 => 33060. Now on port 2200.
So changed port in the mysql client config to 2200.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With