MySQL: Lost connection to MySQL server at 'reading initial communication packet'
Submitted by Bram Schoenmakers on 4 February, 2009 - 16:41.
At some point, it was impossible for remote clients to connect to the MySQL server. The client (some application on a Windows platform) gave a vague description like Connection unexpectedly terminated. When remotely logging in with the MySQL client the following error appeared:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
On FreeBSD this happens because there was no match found in /etc/hosts.allow. Adding the following line before the line saying ALL:ALL fixes this:
mysqld: ALL: allow
On non-FreeBSD Unix systems, it is worth to check the files /etc/hosts.allow and /etc/hosts.deny. If you are restricting connections, make sure this line is in /etc/hosts.allow:
mysqld: ALL
or check if the host is listed in /etc/hosts.deny.
Update 14 September 2009
In Arch Linux, a similar line can be added to /etc/hosts.allow:
mysqld: ALL
BIG THANK YOU
Hi, I want to say you BIG THANKS for that article. 2 hours i look for answer and found it on your page.
Thank you!
I had to do this on Arch Linux before I could connect with Navicat. Thank you so much!
works
It works for me too with Ubuntu-server 9.10 (AMD64).
I added
mysqld: ALL
to my hosts.allow and it works like a charm now.
Thanks for this great post.
I can't thank you enough -
I can't thank you enough - I've been looking for this solution for hours. Nice work!
Thanks. You saved my day.
Thanks. You saved my day.
review
add
$cfg['Servers'][$i]['port'] = XXXX;
put the correct port on config.inc.php from phpmyadmin
'reading initial communication packet' error
Hi,
I think you r best with this.I'm using WAMP server ant have the same trouble.So could u please tell me where should I edit(the path)to correct this 'reading initial communication packet' error.
Thank You.
WAMP?
WAMP? No idea, that's not my cup of tea. I'll leave the answer to others.
what?
im totally lost guys sorry, I am getting this error and your saying to put that before all...where is all? exactly what file path is it in? and do i need another program besides mysql?
Thank you
Thank you very much!