Connection String

How to make a connection String?. I m having mysql-4.1.1-alpha as database server. My username to connect the database is "root" and there is no password. I m having com.mysql.jdbc.Driver as database driver to connect to database in my classpath and i m using that driver. I m having a database named "mydatabase". I wanna use a connection String to connect to that database.i does'nt wanna create a datasource name etc.else i need a connection String to connect to the database. How to create a connection String?.Or what will be my connection String?.i hav provided all data above to create one. thanks in advance. --- basha

basha khan
Ranch Hand

Joined: Jan 26, 2002
Posts: 516

posted May 04, 2004 02:51:00

0

I hav used jdbc:mysql://localhost:3306/mydatabase?user=root&password=&autoReconnect=true as connection String.but error occuring as "server connection failed during transaction". I m using Tomcat4.1 as webserver. anyone experienced it?.or knowing how to solve?. --- basha

Make sure your mysql database is up and running first of all, and that you can connect to it with the command-line tools mysql gives you. Also, make sure your don't have a firewall that is blocking whichever port it is using. If that still doesn't work, show us your connection code.

basha khan
Ranch Hand

Joined: Jan 26, 2002
Posts: 516

posted May 04, 2004 23:27:00

0

Originally posted by Lu Battist: Make sure your mysql database is up and running first of all, and that you can connect to it with the command-line tools mysql gives you. Also, make sure your don't have a firewall that is blocking whichever port it is using. If that still doesn't work, show us your connection code.

mysql is working.firewall havin permission to mysql port.that was'nt the prob. if i use mysql 3.1 as db server,it's working.and with mysql-4.1.1-alpha,its's making probs.. something very strange!. --- basha