Slow connection to mysql

I am configuring a new server - dual processor with 64bit architecture - os : mandriva 2007. i have loaded mysql 4.1.21 and using tomcat 4.1 as my application server. it’s observed that the queries takes a long time to excecute. actually i don’t know whether it takes time to connect to mysql or taking time to excecute the query - because when actually running programs it takes time to execute the first command. we have the same set up with mysql4.1.12 and it runs smoothly.

can any body help pls?

thanks in advance

pradeep.

Why you simply do not try it ?

Connect to MySQL using mysql command line client and see how long connection is taking.

Run a query in question to see how long does it take.

thanks for ur reply peter.

i tried connecting through command and running queries. both are fast and there is absolutely no delay.

this is the connection string i use.

" jdbc:mysql://192.168.0.215/rbcl?user=root&password=***** *****&jdbcCompliantTruncation=false&zeroDateTimeBeha vior=convertToNull&autoRecon
nect=true"; and i am using the following for connection.
mysql-connector-java-3.1.13-bin.jar

thanks
pradeep.