Forums Register Login

How do i setup ODBC data source for mysql

+Pie Number of slices to send: Send
I'm writing and application and i want to connect
to mysql server running on my linux box.where can i
get the driver for mysql so i can create the odbc
data source.
Thnx
+Pie Number of slices to send: Send
Henry,
WHy don't you want to use the JDBC driver available from mySql? If you really want an ODBC driver, mySql provides those too for many OS's including Linux.
+Pie Number of slices to send: Send
Hi
Thanks i will use jdbc driver
+Pie Number of slices to send: Send
Hi
I java jdbc driver for mysql please
how do i use it to connect to mysql
server. I mean i how do i install it
so i can load the class. I'm newbie
in jdbc so please help me. Thanks
+Pie Number of slices to send: Send
Henry,
The driver comes with excellent online documentation. Try following the steps and then post to this thread if you get stuck on one of them. (If you reference the step #, people will be able to give more detailed help.)
+Pie Number of slices to send: Send
Hi
I have seen the link to the online documentation thanks
i will read it then figure out how to use it.but i will let
you know when i i'm stuck. I normally don't reply to the post
quiet early because i don't have constant internet connections.
please bear with me.thanks once again i'm grateful
+Pie Number of slices to send: Send
Henry,
No problem. Do post if you get stuck.
+Pie Number of slices to send: Send
Hi
when i load the drive i get error.This is what i have done.
I unzip the my-connect-java-3.1.8.zip into /usr/local/share.
then copied all the jar files in the lib directory of my-connect-java-3.1.8
directory to ext directory of the sun-j2sdk1.5.0. I'm on a linux box.
Then i loaded the driver in my code but when i try to add values to my table which i have created already, l get error and is because the driver is not loaded. This is what i have done.

when i run the code i get these errors
JDBC ERROR
com.mysql.jdbc.Driver
then
Connection error
No suitable driver
I got know to how to load the driver from the documentation.Please what have i done wrong.Once again thank, i preciate every bit of help you are giving me.

[ April 22, 2005: Message edited by: Henry Addo ]
[ April 22, 2005: Message edited by: Henry Addo ]
+Pie Number of slices to send: Send
Henry,
Did you explicitly add the jar files to your classpath? Not being able to load the driver is usually a classpath problem.

I recommend putting the code in one big try/catch block, like this.

If you can't load the driver, you don't really want to continue trying to execute the SQL. You already know it will fail.
+Pie Number of slices to send: Send
I have set the jar files to class path but
i still get the same error.
Want i did was, copied the com and org directory
into the into a directory that i created named bins
then set the path to the bins directory in the
mysql-connect3.1.8 directory. The way i set the path
export PATH=${PATH}${MYSQLCONNECTJAVA_HOME}/bins
and i still get the same error.What i'm i doing
wrong.?
[ April 27, 2005: Message edited by: Henry Addo ]
That feels good. Thanks. Here's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1303 times.
Similar Threads
Production quality JDBC-ODBC driver?
Connecting Java Application with a Database
jdk1.4 jdbc drivers????
Can ODBC be used as the data source for entity bean?
File Dsn Problem?
JDBC and Linux
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:49:43.