Re: localhost vs. 127.0.0.1 error: 'Lost connection to MySQL server during query'

2006-01-11 Thread Gleb Paharenko
Hello.



 [EMAIL PROTECTED]:~# telnet localhost 43306

 Trying 127.0.0.1...

 Connected to localhost.

 Escape character is '^]'.

 Connection closed by foreign host.



I had an experience with similar symptoms which was caused by TCP

wrapper. Check your /etc/hosts.allow.









Lance Rochelle wrote:

 OK here goes I've had a problem for a few days that I can't resolve.

 

 At the OS level

 If I ping the name localhost I get a good return and if I ping

 127.0.0.1 I also get a good return as noted below.

 [EMAIL PROTECTED]:~# ping localhost -c 2

 PING localhost (127.0.0.1) 56(84) bytes of data.

 64 bytes from localhost (127.0.0.1): icmp_seq=3D1 ttl=3D64 time=3D0.034 ms

 64 bytes from localhost (127.0.0.1): icmp_seq=3D2 ttl=3D64 time=3D0.028 ms

 

 --- localhost ping statistics ---

 2 packets transmitted, 2 received, 0% packet loss, time 999ms

 rtt min/avg/max/mdev =3D 0.028/0.031/0.034/0.003 ms

 [EMAIL PROTECTED]:~# ping 127.0.0.1 -c 2

 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.

 64 bytes from 127.0.0.1: icmp_seq=3D1 ttl=3D64 time=3D0.031 ms

 64 bytes from 127.0.0.1: icmp_seq=3D2 ttl=3D64 time=3D0.029 ms

 

 --- 127.0.0.1 ping statistics ---

 2 packets transmitted, 2 received, 0% packet loss, time 999ms

 rtt min/avg/max/mdev =3D 0.029/0.030/0.031/0.001 ms

 

 when I run the restart script I get the following in syslog

 Jan 10 15:35:51 www mysqld[2334]: 060110 15:35:51 [Note]

 /usr/sbin/mysqld: Normal shutdown

 Jan 10 15:35:51 www mysqld[2334]:

 Jan 10 15:35:51 www mysqld[2334]: 060110 15:35:51  InnoDB: Starting shutdow=

 n...

 Jan 10 15:35:54 www mysqld[2334]: 060110 15:35:54  InnoDB: Shutdown

 completed; log sequence number 0 43884

 Jan 10 15:35:54 www mysqld[2334]: 060110 15:35:54 [Note]

 /usr/sbin/mysqld: Shutdown complete

 Jan 10 15:35:54 www mysqld[2334]:

 Jan 10 15:35:54 www mysqld_safe[2590]: ended

 Jan 10 15:35:55 www mysqld_safe[2649]: started

 Jan 10 15:35:55 www mysqld[2652]: 060110 15:35:55  InnoDB: Started;

 log sequence number 0 43884

 Jan 10 15:35:55 www mysqld[2652]: /usr/sbin/mysqld: ready for connections.

 Jan 10 15:35:55 www mysqld[2652]: Version: '

 4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock'=20

 port: 43306  Source distribution

 

 All looks good so far

 

 

 here is my my.cnf file

 [EMAIL PROTECTED]:/etc/mysql# grep -v ^# my.cnf

 [client]

 port=3D 43306

 socket=3D /var/run/mysqld/mysqld.sock

 [mysqld_safe]

 socket=3D /var/run/mysqld/mysqld.sock

 nice=3D 0

 [mysqld]

 user=3D mysql

 pid-file=3D /var/run/mysqld/mysqld.pid

 socket=3D /var/run/mysqld/mysqld.sock

 port=3D 43306

 basedir=3D /usr

 datadir=3D /var/lib/mysql

 tmpdir=3D /tmp

 language=3D /usr/share/mysql/english

 skip-external-locking

 key_buffer=3D 16M

 max_allowed_packet=3D 16M

 thread_stack=3D 128K

 query_cache_limit=3D 1048576

 query_cache_size=3D 16777216

 query_cache_type=3D 1

 log-bin=3D /var/log/mysql/mysql-bin.log

 max_binlog_size=3D 104857600

 skip-bdb

 [mysqldump]

 quick

 quote-names

 max_allowed_packet=3D 16M

 [mysql]

 [isamchk]

 key_buffer=3D 16M

 

 here is the variables from mysqladmin -u root -p variables

 +-

 +--+

 | Variable_name   | Value=20

   |

 +-+=

 --+

 | back_log| 50   =20

   |

 | basedir | /usr/=20

   |

 | bdb_cache_size  | 8388600  =20

   |

 | bdb_home|  =20

   |

 | bdb_log_buffer_size | 0=20

   |

 | bdb_logdir  |  =20

   |

 | bdb_max_lock| 1=20

   |

 | bdb_shared_data | OFF  =20

   |

 | bdb_tmpdir  |  =20

   |

 | binlog_cache_size   | 32768=20

   |

 | bulk_insert_buffer_size | 8388608  =20

   |

 | character_set_client| latin1   =20

   |

 | character_set_connection| latin1   =20

   |

 | character_set_database  | latin1   =20

   |

 | character_set_results   | latin1   =20

   |

 | 

localhost vs. 127.0.0.1 error: 'Lost connection to MySQL server during query'

2006-01-10 Thread Lance Rochelle
OK here goes I've had a problem for a few days that I can't resolve.

At the OS level
If I ping the name localhost I get a good return and if I ping
127.0.0.1 I also get a good return as noted below.
[EMAIL PROTECTED]:~# ping localhost -c 2
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.028 ms

--- localhost ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.028/0.031/0.034/0.003 ms
[EMAIL PROTECTED]:~# ping 127.0.0.1 -c 2
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.029 ms

--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.029/0.030/0.031/0.001 ms

when I run the restart script I get the following in syslog
Jan 10 15:35:51 www mysqld[2334]: 060110 15:35:51 [Note]
/usr/sbin/mysqld: Normal shutdown
Jan 10 15:35:51 www mysqld[2334]:
Jan 10 15:35:51 www mysqld[2334]: 060110 15:35:51  InnoDB: Starting shutdown...
Jan 10 15:35:54 www mysqld[2334]: 060110 15:35:54  InnoDB: Shutdown
completed; log sequence number 0 43884
Jan 10 15:35:54 www mysqld[2334]: 060110 15:35:54 [Note]
/usr/sbin/mysqld: Shutdown complete
Jan 10 15:35:54 www mysqld[2334]:
Jan 10 15:35:54 www mysqld_safe[2590]: ended
Jan 10 15:35:55 www mysqld_safe[2649]: started
Jan 10 15:35:55 www mysqld[2652]: 060110 15:35:55  InnoDB: Started;
log sequence number 0 43884
Jan 10 15:35:55 www mysqld[2652]: /usr/sbin/mysqld: ready for connections.
Jan 10 15:35:55 www mysqld[2652]: Version: '
4.1.11-Debian_4sarge2-log'  socket: '/var/run/mysqld/mysqld.sock' 
port: 43306  Source distribution

All looks good so far


here is my my.cnf file
[EMAIL PROTECTED]:/etc/mysql# grep -v ^# my.cnf
[client]
port= 43306
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= 43306
basedir= /usr
datadir= /var/lib/mysql
tmpdir= /tmp
language= /usr/share/mysql/english
skip-external-locking
key_buffer= 16M
max_allowed_packet= 16M
thread_stack= 128K
query_cache_limit= 1048576
query_cache_size= 16777216
query_cache_type= 1
log-bin= /var/log/mysql/mysql-bin.log
max_binlog_size= 104857600
skip-bdb
[mysqldump]
quick
quote-names
max_allowed_packet= 16M
[mysql]
[isamchk]
key_buffer= 16M

here is the variables from mysqladmin -u root -p variables
+-
+--+
| Variable_name   | Value 
  |
+-+--+
| back_log| 50
  |
| basedir | /usr/ 
  |
| bdb_cache_size  | 8388600   
  |
| bdb_home|   
  |
| bdb_log_buffer_size | 0 
  |
| bdb_logdir  |   
  |
| bdb_max_lock| 1 
  |
| bdb_shared_data | OFF   
  |
| bdb_tmpdir  |   
  |
| binlog_cache_size   | 32768 
  |
| bulk_insert_buffer_size | 8388608   
  |
| character_set_client| latin1
  |
| character_set_connection| latin1
  |
| character_set_database  | latin1
  |
| character_set_results   | latin1
  |
| character_set_server| latin1
  |
| character_set_system| utf8  
  |
| character_sets_dir  | /usr/share/mysql/charsets/
  |
| collation_connection| latin1_swedish_ci 
  |
| collation_database  | latin1_swedish_ci 
  |
| collation_server| latin1_swedish_ci 
  |
| concurrent_insert   | ON