Tomcat connecting to MySQL - Ubuntu 8.10 Server

Derek Broughton news at
Mon Nov 17 02:31:38 UTC 2008

Ambrose Krapacs wrote:

PLEASE don't top-post.

> Perhaps you are on to something here. Below is the output from 3
> attempts to telnet to localhost on port 3306. Something doens't seem
> right..
> ambrose at ubuntusrvr:~$ telnet localhost 3306
> Trying
> Connected to localhost.
> Escape character is '^]'.
> =
> 5.0.67-0ubuntu6pOw,olQ3,FIyF1c!tIO2IConnection closed by foreign
> host.

Actually, that looks pretty normal - I don't do MySQL, but many servers 
close the port immediately if you don't send a proper packet.  In this 
case it did _open_ the port, so it's there and accepting connections.

Mysql must have a command line client.  Try it.

For instance, in postgres, I'll use:

# psql database -h localhost

for a local tcp-socket connection to "database" - but you definitely need 
it to be trying to connect by TCP, not unix sockets.

More information about the ubuntu-users mailing list