8

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?

Sebastian Sulinski
  • 5,815
  • 7
  • 39
  • 61

2 Answers2

5

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

Jonathan
  • 13,947
  • 17
  • 94
  • 123
  • That's not possible. He is using the ip address specifically because he is supplying the port. If you supply `localhost` it will (at least going by what I've read) always use the socket, not TCP. – Elias Sep 07 '21 at 05:40
1

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.

Rob
  • 190
  • 2
  • 3
  • 11