Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111
For the past couple of days, for some reason I was unable to connect to the MySQL database on the system I worked, it was not a problem till now, since all I needed was a data grid, but now I had to use workbench.
The error I was getting was: Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111
Well, it took me a couple of hours to gast that but I have finally found the reasone.
Early this week we have changed the bind address of the MySQL server in the my.inf file to be the external address of the system.
What i had to do was to match the address of the bind from localhost to the external one, so the correct command was:
ssh -v -f -N -L 3307:192.168.0.1:3306 firstname.lastname@example.org