Hello, I am attempting to connect to a mysql database, but I don't quite know how to specify were the table is. My host is localhost, and I specify it like this: jdbc:mysql://localhost/table1 but I end up with an SQLException. How do you specify the correct host?? thanks, c.
Adam Hardy
Ranch Hand
Joined: Oct 09, 2001
Posts: 563
posted
0
Originally posted by Chris-Huisman: Hello, jdbc:mysql://localhost/table1 but I end up with an SQLException.
That's not the table you specify there, it's the database name. In mysql to start with on installation, you have only 2: test & mysql. You can make your own one for your app in sql with create database chris1; use chris1; so your url would be: jdbc:mysql://localhost/chris1 hth, adam
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Chris-Huisman
Greenhorn
Joined: Jan 25, 2002
Posts: 23
posted
0
Thanks for your help, but I figured out what my problem was. I neglected to add the port after //localhost. Thanks, c.