Re: Communication failure during handshake. Is there a server running on localhost:3306?
Posted by: Andrey Barbolin
Date: April 03, 2007 03:32PM

Hi, All!

I try to use mysql-connector-java-3.0.17-ga.tar.gz mysql-connector-java-5.0.5.tar.gz.

But i can't connect to mysql:

SQLException: Communication link failure: java.io.EOFException, underlying cause: null

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1414)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.jav


ok...

I tryed (ynkulbyh is my pc name): mysql --host ynkulbyh -uroot -proot
result: ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

What heppens? Why i can't connect to mysql?
I tryed old_password() and other things discrubed in this topic, but it doesn't help me! :(


my OS: Linux version 2.6.20-ARCH (root@Wohnung) (gcc version 4.1.2) #1 SMP PREEMPT Sat Mar 24 10:51:35 CET 2007

net stat -ta:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:3306 *:* LISTEN


telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
Connection closed by foreign host.


telnet ynkulbyh 3306
Trying 127.0.0.1...
Connected to ynkulbyh.
Escape character is '^]'.
Connection closed by foreign host.


mysql --host localhost -uroot -proot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

*** my.cnf *********************************
# The following options will be passed to all MySQL clients
[client]
password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
#3306
socket = /tmp/mysql.sock
datadir = /var/lib/mysql
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 16K
myisam_sort_buffer_size = 8M
#bind-address=ynkulbyh

server-id = 1


[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
#no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
************************************
also i tryed bind-address=192.168.33.70 #my local ip

I try to solv this problem for saveral days! But nothing help me!:) :(

Can anybody help me?

Options: ReplyQuote


Subject
Written By
Posted
Re: Communication failure during handshake. Is there a server running on localhost:3306?
April 03, 2007 03:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.