Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've recently moved from MySQL4 to MySQL5 (we had apps that required MySQL4 which we'd finally replaced)

Since then, I've been having LOTS of issues similar to:-

connect() failed: Lost connection to MySQL server at 'reading initial communication packet', system error: 0 

Yes, that is System Error 0 - "Success".

I've no idea why this is happening - but want to find out why

Here's my (sanitised) 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

key_buffer      = 1048M
max_allowed_packet  = 16M
thread_stack = 2M
thread_cache_size   = 16384
sort_buffer_size    = 256K
read_buffer_size    = 2M
read_rnd_buffer_size    = 256K
tmp_table_size      = 512M
max_heap_table_size = 512M
query_cache_size    = 512M
thread_concurrency  = 16
set-variable = table_cache=16384
max_connections     = 500

wait_timeout = 3600

innodb_buffer_pool_size = 1024M
innodb_additional_mem_pool_size = 8M
innodb_lock_wait_timeout = 50
innodb_flush_method=O_DIRECT
innodb_log_buffer_size = 8M
innodb_thread_concurrency = 8
innodb_file_per_table=1

query_cache_limit       = 1024M
query_cache_size        = 512M
query_cache_type = 1
server-id       = 9
log_bin         = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M

expire_logs_days    = 3

skip-bdb

[mysqldump]
quick
quote-names
max_allowed_packet  = 16M

[mysql]
prompt                  = (\u@atlas) [\d]>\\_

[isamchk]
key_buffer      = 16M

!includedir /etc/mysql/conf.d/

EDIT I changed the my.cnf above - I've just realised it was the one from the old server! Also - this is 5.0, not 5.1

share|improve this question
    
Do you have mysql library updated on all clients as well? –  rvs May 10 '11 at 11:46
    
Varying clients... all at least 5.0 though –  Mez May 10 '11 at 12:09

2 Answers 2

For one, get rid of the line "skip-bdb" as posted here: Mysql-Server-5.1 upgrade problem

share|improve this answer
    
Crap - my.cnf from wrong server! –  Mez May 10 '11 at 11:40
    
Contains the same line reading "skip-bdb"... Drop it / comment it. And check out what @uesp said too. –  Henk May 10 '11 at 11:43

There seems to be a detailed bug report that explains this error with a possible solution to increase the connect_timeout parameter.

share|improve this answer
    
Hmmm... I've changed that - will know tomorrow (from the error reports) whether it's working :) –  Mez May 10 '11 at 12:18
    
Nope - it didn't –  Mez May 12 '11 at 14:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.