Red Hat Bugzilla – Bug 215554
Can't connect to MySQL using JDBC
Last modified: 2007-11-30 17:11:48 EST
Description of problem:
Can't connect to MySQL databases
Version-Release number of selected component (if applicable):
Steps to Reproduce:
3.set class path to usr/lib64/gcj/mysql-connector-java
4.Open Openoffice database
5. Attempt connection for MySQL using JDBC
test connection fails
New install of Linux x86_64. Switched to "Native" version of OpenOffice.
Downloaded latest Java (i386 version) from Sun site. (Note: Openoffice didn't
accept AMD 64 version). Downloaded connector from MySQL site and stuck it in
/usr/java/jrexxx.xx/lib/ext. Connected the first time and I am back in business.
Not sure if this bug or I am doing something wrong with FC 6 version. Thx
What do you mean by a "Native" version of OOo ? I'm trying to figure what you
changed between "not working" and "working".
Do you do all three of...
a) replace the x86_64 64bit OOo with a 32bit OOo (the upstream one, or the 32bit
fedora one) ?
b) additionally install sun java ?
c) replace mysql-connector-java with one directly downloaded from upstream ?
or just some/none of those changes ?
Yes, I did all three
a. Removed the openoffice that came with the FC 6 distribution
b. Then, installed the openooffice downloaded from the openoffice site (they
refer to it as "Native" i.e not linked to any particular distribution); I don't
think they have a x86_64 version.
c. Then, downloaded Java JRE from Sun's site. At first tried the x86_64 version
but it was not accepted by Openoffice (msg. "not a valid JRE"). Then removed
that version and downloaded and installed the i386 Java JRE and it was accepted
by Openoffice as a valid JRE.
d. Downloaded the mysql-connector-java directly from MySQL
e. Did not replace existing mysql-connector-java but added the one I downloaded
as it went into a different directory as per my original comment.
Hope this helps
So a 32bit OOo with sun java worked, while the x86_64 one with gcj didn't
might be a bit of time until I'm able to set up a mysql server and get this
The correct classpath to use for the bundled fedora (extras) connector should
have been through Select Archive and choose
not the directory /usr/lib64/gcj/mysql-connector-java
Made sure the mysql-connector-java was installed and in the dir as noted in Com.
#4. Made the change and still get "The JDBC driver could not be loaded". Note
tried on both FC 6 1386 and FC 6 x86_64 with the same result.
Ok success. Didn't realize that when I made the class path changes (add new /
delete old) they were not being accepted. As soon as closed calc it reverted to
old (wrong settings) Didn't know that you had to "archive" the class path for it
to be available. Thx for your help.