Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

os Catalina and Laravel Homestead MySql error: ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10

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?

like image 522
Sebastian Sulinski Avatar asked Feb 12 '20 19:02

Sebastian Sulinski


People also ask

Why do I get error 2007 (hy000) in MySQL?

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.

Why am I getting an error when connecting to MySQL server?

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.

What does error hy000 mean in Ubuntu?

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.

What are some common MySQL port 33060 port errors?

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


2 Answers

In my case, changing my host from 127.0.0.1 to localhost fixed it.

like image 62
Jonathan Avatar answered Oct 10 '22 11:10

Jonathan


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.

like image 31
Rob Avatar answered Oct 10 '22 11:10

Rob