Bug #45207 reading initial communication packet
Submitted: 30 May 2009 17:31 Modified: 3 Jun 2009 1:14
Reporter: Alexander Mysql Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:14.12 Distrib 5.0.51a, for debian-linux OS:Linux (Debian Lenny)
Assigned to: CPU Architecture:Any
Tags: reading initial communication packet

[30 May 2009 17:31] Alexander Mysql
Description:
OS: Debian Stable(Lenny)
Kernel: Linux 2.6.24-etchnhalf.1-686 #1 SMP Fri Dec 26 04:10:16 UTC 2008 i686 GNU/Linux
mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2

# mysql -uroot --host 127.0.0.1 -P3306 -p
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

BUT

# mysql -uroot --host localhost -P3306 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 162
Server version: ...

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

-------------------------------------------------------
Configuration files:
-------------------------------------------------------
# cat /etc/mysql/my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
bind-address = 0.0.0.0
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
expire_logs_days = 10
max_binlog_size = 100M
skip-bdb

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]

[isamchk]
key_buffer = 16M

!includedir /etc/mysql/conf.d/
-----------------------------------------------------
Changing bind-address to another values dosn't helps.

-----------------------------------------------------
#cat /etc/hosts.deny
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

-----------------------------------------------------

# cat /etc/hosts
127.0.0.1 localhost

-----------------------------------------------------
IPTABLES rules is flushed. I'm trying to purge and install server one more time - no changes.

Any ideas? How can i debug this??

How to repeat:
I has no idea, but if it's was necesary, i may give a ssh access to the server
[31 May 2009 0:24] Sveta Smirnova
Thank you for the report.

But version 5.0.51a is old. Please upgrade to current version 5.0.82, try with it and if problem still exists provide full server error log file.
[3 Jun 2009 1:14] Alexander Mysql
Why it happen: Incorrect file and directory's permitions on system..