[ILUG] MySQL Problems
David Gourdelier
david.gourdelier at gmail.com
Wed Apr 6 21:54:03 IST 2005
Hi,
I suggest you check the following:
. No Firewall is running on your server
. The mysql JDBC driver is installed & configured
You can try to diagnose the problem by running tools like ethereal or
tcpdump on the port 3306 in order to check if java can send packets to
Mysql and if Mysql can answer.
You can also check for incoming connection in Mysql's server logs.
Since you can connect to your Mysql with other tools, I would think
that the problem is likely on the java part.
/ David Gourdelier
On Apr 6, 2005 7:38 PM, Linux ilug <linux.michael at gmail.com> wrote:
> Can anyone help me with this? I have a MySQL server running on port 3306
> everytime I try to connect to the my sql database I get the following
> returned from the java program I am running.
>
> java.net.BindException: Address already in use
> SQL error--: java.sql.SQLException: Cannot connect to MySQL server on
> localhost:3306. Is there a MySQL server running on the machine/port you
> are trying to connect to? (java.net.ConnectException) 0 08S01
>
> I have checked for mysql processes and the following is returned
>
> linux:/opt # ps aux | grep mysql
> root 8509 0.0 0.5 3496 1324 ? S 13:48 0:00 /bin/sh /usr/bin/mysqld_safe
> --user=mysql --pid-file=/var/lib/mysql/mysqld.pid
> --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql
> mysql 8544 0.0 0.8 21748 2252 ? Sl 13:48 0:00 /usr/sbin/mysqld
> --basedir=/usr --datadir=/var/lib/mysql --user=mysql
> --pid-file=/var/lib/mysql/mysqld.pid --skip-locking --port=3306
> --socket=/var/lib/mysql/mysql.sock
> root 9588 0.0 0.2 1696 632 pts/2 S+ 17:32 0:00 grep mysql
>
> I have installed the latest version of mysql and I can connect on to it with
> mysql administrator, query browser and others. Is there something I'm
> missing that you guy can help me with? Or if I haven't given enough
> information can you help me to diagnose it.
>
> Thanks again
> Mike
More information about the ILUG
mailing list