I can't open more than one MySQL connections at the same time in my Mac OS. For example if I connect to a database using Sequel Pro and then I go to Terminal and try to connect to MySQL I get this error:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 102
And of course the problem occurs also the other way around even in my websites. If I open MySql using Sequel or Terminal my local websites can't connect to MySQL.
SO => Mac Os El Capitan MySQL => 5.7.9
Increasing connect_timeout in my.cnf file helped me in exactly the same situation. I've just added connect_timeout 30
to my.cnf file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.