<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johnny5</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johnny5"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Johnny5"/>
	<updated>2026-12-05T13:03:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Connect_MySQL_and_Base&amp;diff=85665</id>
		<title>Connect MySQL and Base</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Connect_MySQL_and_Base&amp;diff=85665"/>
		<updated>2008-07-06T13:22:58Z</updated>

		<summary type="html">&lt;p&gt;Johnny5: Added that the Class Path button should be pressed for finding Add Archive&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial to connect MySQL database with OpenOffice.org Base. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using JDBC on Windows ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using ODBC on Windows ==&lt;br /&gt;
&lt;br /&gt;
== Using JDBC on Linux ==&lt;br /&gt;
OpenOffice.org comes directly with support of JDBC connectivity to multiple databases. OpenOffice.org needs [http://www.java.com/en/download/index.jsp Java Runtime Environment] to be able to use JDBC. Verify that you have JRE on your OOo by going to &amp;#039;&amp;#039;&amp;#039;Tools - Options - OpenOffice.org General - Java&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
Next step is to download the [http://www.mysql.com/products/connector/j/ mysql-connector-J] which you can download from the [http://www.mysql.com MySQL website]. [http://www.mysql.com/products/connector/j/ MySQL Connector/J] adds JDBC connectivity to MySQL. Unpack, untar or unzip the downloaded file anywhere where you can access it as a normal user, for example, to your desktop. On KDE, you can use Ark, on Gnome FileRoller, or even the Nautilus scripts that are included in some Linux distributions, or the usual &amp;quot;tar -zvf&amp;quot; from a console. A directory is created at the desired location named mysql-connector-java-x.x.x, where the x.x.x represents the version number of the JDBC connector you have downloaded. Inside this directory, you will find a file called mysql-connector-x.x.x-java-bin.jar.&lt;br /&gt;
&lt;br /&gt;
Start OpenOffice.org and go to the menu &amp;#039;&amp;#039;&amp;#039;Tools - Options - OpenOffice.org General Java&amp;#039;&amp;#039;&amp;#039;. Click on the button &amp;#039;&amp;#039;&amp;#039;Class Path...&amp;#039;&amp;#039;&amp;#039;, then choose &amp;#039;&amp;#039;&amp;#039;Add Archive...&amp;#039;&amp;#039;&amp;#039; and navigate to where the mysql-connector-x.x.x-java-bin.jar file is located. Click on &amp;#039;&amp;#039;&amp;#039;Open&amp;#039;&amp;#039;&amp;#039;, and the file should then appear in the list of &amp;#039;&amp;#039;&amp;#039;Assigned folders and Archives&amp;#039;&amp;#039;&amp;#039;. You can then click on &amp;#039;&amp;#039;&amp;#039;OK&amp;#039;&amp;#039;&amp;#039; and close OpenOffice.org completely. You may receive a message indicating that you have to do that anyway in order for OpenOffice.org to be able recognize your changes correctly. If the OpenOffice.org quickstarter is running, you should close that application as well.&lt;br /&gt;
&lt;br /&gt;
Instead of downloading the connector from the MySQL download site, you can also use the corresponding packages of your distribution like&lt;br /&gt;
* libmysql-java for debian and ubuntu&lt;br /&gt;
&lt;br /&gt;
When you restart OpenOffice.org, you should now be able to create a new database document that can connect to your existing mysql database, i.e. you need to have created your database first on your mysql server, for example with the CREATE DATABASE command from the mysql command line client or from within PHPMyAdmin if you are using that graphical user interface to administer your mysql server. &lt;br /&gt;
&lt;br /&gt;
Now do the following :&lt;br /&gt;
&lt;br /&gt;
1) &amp;#039;&amp;#039;&amp;#039;File &amp;gt; New &amp;gt; Database&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
2) Click on the radio button &amp;#039;&amp;#039;&amp;#039;Connect to an existing database&amp;#039;&amp;#039;&amp;#039; and choose &amp;#039;&amp;#039;&amp;#039;MySQL&amp;#039;&amp;#039;&amp;#039; from the dropdown menu. Click on &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
3) In the next dialog, you should accept the default choice of &amp;#039;&amp;#039;&amp;#039;Connect using JDBC&amp;#039;&amp;#039;&amp;#039;, and then click on &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
4) In the following dialog, enter the name of your mysql database in the field &amp;#039;&amp;#039;&amp;#039;Name of the database&amp;#039;&amp;#039;&amp;#039; as it is called on the mysql server, paying attention to the spelling. In the &amp;#039;&amp;#039;&amp;#039;Server URL&amp;#039;&amp;#039;&amp;#039; field, enter either the fully qualified internet domain name of the server on which your mysql server is running, or its IP address or, if you are running the mysql server locally on your own computer, simply type localhost. You can adjust the connection port or leave default port 3306 in the field &amp;#039;&amp;#039;&amp;#039;Port number&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
For the field &amp;#039;&amp;#039;&amp;#039;MySQL JDBC driver class:&amp;#039;&amp;#039;&amp;#039; enter the class name for the JDBC driver you installed. You can find the correct class name in the documentation that came with the driver. MySQL java connector archive version 5.1.6 contains connector-j.pdf document with description in subdirectory docs. The class name is &amp;#039;&amp;#039;&amp;#039;com.mysql.jdbc.Driver&amp;#039;&amp;#039;&amp;#039; for version 5.1.6. Click on &amp;#039;&amp;#039;&amp;#039;Test Class&amp;#039;&amp;#039;&amp;#039; just to make sure that you have correctly set up the access to the connector as detailed above. If the connector has been set up correctly, you will get a message that says &amp;#039;&amp;#039;&amp;#039;The JDBC driver was loaded correctly&amp;#039;&amp;#039;&amp;#039;. Now click on &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
5) Now enter the name of the user and the password (if required by the mysql server) that you have previously created for use of the database on the mysql server. If you click on &amp;#039;&amp;#039;&amp;#039;Test Connection&amp;#039;&amp;#039;&amp;#039;, you will be asked for a password if you have ticked the password box beforehand. If the connection to the database succeeds, you will get a message &amp;#039;&amp;#039;&amp;#039;Connection test: The connection was established successfully&amp;#039;&amp;#039;&amp;#039;. Click on &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
6) On the final screen of the database wizard dialog, you can in general leave the default settings as they are, i.e. &amp;#039;&amp;#039;&amp;#039;Yes, register the database for me&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Open the database for editing&amp;#039;&amp;#039;&amp;#039;. Click on &amp;#039;&amp;#039;&amp;#039;Finish&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
7) You will be asked for a file name to give to your database document. Once you have done this and clicked on &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;, the database document will open, and the Forms button on the left will be highlighted. Congratulations, you have now connected to your MySQL database via the JDBC connector.&lt;br /&gt;
&lt;br /&gt;
== Using ODBC on Linux ==&lt;br /&gt;
OpenOffice.org also support ODBC connectivity to MySQL, you will need [http://www.unixodbc.org/ Unix-ODBC] in order to make a connection through it.&lt;br /&gt;
&lt;br /&gt;
== Recommendations settings ==&lt;br /&gt;
&lt;br /&gt;
Known issues regarding MySQL and OpenOffice.org can be avoided by having specific settings here are some of those:&lt;br /&gt;
&lt;br /&gt;
=== MySQL settings ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that MySQL is using TCP/IP as opposed to sockets. Edit the my.cnf file at /etc/ and comment &amp;#039;&amp;#039;&amp;#039;skip-networking&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== OpenOffice.org settings ===&lt;br /&gt;
&lt;br /&gt;
* OpenOffice.org uses Java for JDBC, please make sure you have JRE at Tools - Options - OpenOffice.org General - Java&lt;br /&gt;
* Declare the &amp;#039;&amp;#039;&amp;#039;mysql-connector-j.bin&amp;#039;&amp;#039;&amp;#039; at the classpath at Tools - Options - OpenOFfice.org General - Java&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;/div&gt;</summary>
		<author><name>Johnny5</name></author>
	</entry>
</feed>