• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Connection String

 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
A feeble attempt to tell you about our stuff that makes us money
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic