|
Using MySQL
From NeoWiki
(Difference between revisions)
Revision as of 10:38, 28 May 2005 (edit) Sardisson (Talk | contribs) m (category) ← Previous diff |
Revision as of 06:34, 15 August 2005 (edit) (undo) ( | contribs) m (→Installation) Next diff → |
||
Line 4: | Line 4: | ||
==== Installation ==== | ==== Installation ==== | ||
- | * Download Connector/J from the [http://www.mysql.com/products/connector/ MySQL website]. | + | * Download Connector/J 3.0 from the [http://www.mysql.com/products/connector/ MySQL website]. |
** The included README gives much information. | ** The included README gives much information. | ||
** The most important keypoints are: | ** The most important keypoints are: | ||
Line 10: | Line 10: | ||
*** the URL format: <tt>jdbc:mysql://host.domain/database_name</tt> | *** the URL format: <tt>jdbc:mysql://host.domain/database_name</tt> | ||
** You will need a version of Connector/J that supports Java 1.3.x, since that is the version of Java used in NeoOffice/J. | ** You will need a version of Connector/J that supports Java 1.3.x, since that is the version of Java used in NeoOffice/J. | ||
+ | *** Note: Connector/J 3.1 and, presumably, later versions are not Java 1.3.x compatible. | ||
*The jar file location: | *The jar file location: | ||
Line 15: | Line 16: | ||
** for Neo/J: I had to put it in the <tt><NeoOffice>/Contents/MacOS/classes</tt> folder to get it found. Didn't check with recent release if the previous classpath setting does work. | ** for Neo/J: I had to put it in the <tt><NeoOffice>/Contents/MacOS/classes</tt> folder to get it found. Didn't check with recent release if the previous classpath setting does work. | ||
::: FYI. I just tried adding the MySQL jar file using the Security pane in the Tools->Options menu item Neo/J 1.1 Alpha 2. After adding the jar file in that pane and restarting Neo/J, I successfully connected to my MySQL database. | ::: FYI. I just tried adding the MySQL jar file using the Security pane in the Tools->Options menu item Neo/J 1.1 Alpha 2. After adding the jar file in that pane and restarting Neo/J, I successfully connected to my MySQL database. | ||
+ | ::: This works with Neo/J 1.1 final. The former option is probably better for providing it to all users, whereas this is well suited for | ||
: ''There is also an attachment (.sxw) to [http://www.openoffice.org/issues/show_bug.cgi?id=13753 OpenOffice.org Issue 13753] which contains screenshots and a different location for placing the Connector/J file.'' | : ''There is also an attachment (.sxw) to [http://www.openoffice.org/issues/show_bug.cgi?id=13753 OpenOffice.org Issue 13753] which contains screenshots and a different location for placing the Connector/J file.'' | ||
Revision as of 06:34, 15 August 2005
Contents |
Enabling NeoOffice/J or OpenOffice.org/X11 to connect to MySQL databases
Using JDBC and Connector/J
Installation
- Download Connector/J 3.0 from the MySQL website.
- The included README gives much information.
- The most important keypoints are:
- the class name of the JDBCdriver: com.mysql.jdbc.Driver
- the URL format: jdbc:mysql://host.domain/database_name
- You will need a version of Connector/J that supports Java 1.3.x, since that is the version of Java used in NeoOffice/J.
- Note: Connector/J 3.1 and, presumably, later versions are not Java 1.3.x compatible.
- The jar file location:
- for OOo/X11: you can put it where you want. To let OOo know, you shoud go to "Tools->Options" menu item. Then in the "security" pane, there is a place to add directories to classpath. Click on browse and find your jar file.
- for Neo/J: I had to put it in the <NeoOffice>/Contents/MacOS/classes folder to get it found. Didn't check with recent release if the previous classpath setting does work.
- FYI. I just tried adding the MySQL jar file using the Security pane in the Tools->Options menu item Neo/J 1.1 Alpha 2. After adding the jar file in that pane and restarting Neo/J, I successfully connected to my MySQL database.
- This works with Neo/J 1.1 final. The former option is probably better for providing it to all users, whereas this is well suited for
- There is also an attachment (.sxw) to OpenOffice.org Issue 13753 which contains screenshots and a different location for placing the Connector/J file.
Configuration
With the above basic setup, the connection should work. Then you come to the fine tuning stuff: charset, etc...
There are additional pointers available in this thread on trinity on other MySQL configuration issues.
Using OBDC
mansky posts some steps for getting OBDC to work with MySQL and OpenOffice.org/X11 in this post on trinity; it also contains other OOo/MySQL pointers.
kervalen posts some steps for getting OBDC to work with MySQL and NeoOffice/J in this post on trinity.
Using the Database with your NeoOffice/J Documents
information on how to use the database