Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenOffice + mySQL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sessionID
Apprentice
Apprentice


Joined: 11 Nov 2002
Posts: 266
Location: hungary

PostPosted: Fri Jul 11, 2003 5:14 pm    Post subject: OpenOffice + mySQL Reply with quote

I saw a few notes about connecting OOo to MySQL is really hard. So here's a simple solution, I hope it'll work for everyone.
(Note: another way is described by jj in A repleacement for MS Access?)

You'll need:
- OpenOffice (I've used 1.1rc)
- MySQL (I have 4.0.12) [but older OO any MySQL versions should work too]
- java runtime environment (1.4.x)
- Connector/J form MySQL (mySQL JDBC driver)
dl: http://www.mysql.com/products/connector-j/index.html
Version 2.0.14 is ok.

I assume You have MySQL set up correctly (You can connect / query / write) + java and OOo is working.

In OOo create a new document.
Select tools->data sources.

Click on "new data source".

General tab:
Name: boooo
Database type: MySql

MySql tab:
Type of connection: Use Conncetor/J3
Class: com.mysql.jdbc.Driver
Data source URL: sdbc:mysql:jdbc:localhost:3306/some_database
User: ...
+ check "use password" if needed.

Now click on "Apply" and close the dialog (hehe ;)).

Unpack the mysql-connector-java-X.X.XXX.tar.gz You obtained from mysql.com to any folder.

In OOo go to tools->options->OpenOffice.org->security
Make sure java is enabled.
[When I installed OOo my JRE was not recognised, but sometime - dunno when and why - OOo prompted me to select a folder where the jre could be found. Probably You'll be prompted to do this the first time connecting to a database. Restart OOo if done.]
Click on browse next to Classpath. Select the extracted mysql-connector-java-X.X.XX-bin.jar. Hit OK, than restart OOo.

Now get back to tools->data sources.
Select the created connection and click on "tables". You'll be prompted for the mysql password, and You should be able to operate with the database.

Hope this helps!
_________________
((( WeFunk )))


Last edited by sessionID on Fri Jul 11, 2003 10:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
wizy
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2002
Posts: 133

PostPosted: Fri Jul 11, 2003 9:52 pm    Post subject: Reply with quote

great little tutorial. good job
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum