Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Le 08/02/12 20:02, Pertti Rönnberg a écrit :

Hi Pertti,


What exactly is the issue you have had with using the MySQL JDBC
connector on Windows ?

Documentation :

Prerequisites : a JDK or JRE, access to a running mysql server instance,
either locally or via the network (beware that internet connections to
externally hosted mysql servers can be very slow, or access can be
refused to them by hosting service companies for various security
reasons). The user attempting to connect to the mysql server instance
must have the rights to do so, and also any rights to create, modify ro
change tables, table structures, etc, according to what is desired for
that user. These must be configured in advance within the mysql server.
A database schema (database name) must be created in advance of any
attempt to connect via LO and the JDBC connector.

A useful tool for this is phpmyadmin. This is included in XAMP for
example, which contains a complete apache web server, mysql and php
stack, obtainable here :

http://www.apachefriends.org/fr/xampp-windows.html


via JDBC: (These steps are only valid for the MySQL connector)

Get the newest JDBC driver from

http://www.mysql.com/downloads/connector/j/

Start LibreOffice

Goto Tools > Options > Java

Press the browse button near "Classpath" and browse for the *.jar
file(s) of your driver.

The jar file is part of the zip file that you download from the mysql
website. Look for the file called mysql-connector-java-5.1.18.jar

Restart LibreOffice

Open the data source administration dialog (Tools/Data Sources...) or
start the database wizard.

Press the button "New Data Source", in the name field, enter a valid
name like "MySQL JDBC", and keep "JDBC" as type.

Enter the data source URL
mysql://host:3306/Nameofyourdatabase

Switch to the tab page JDBC. Now you have to enter the driver class
name. For the MySQL connector driver you have to insert:

com.mysql.jdbc.Driver.

You can test that the driver is loaded correctly by pressing the
corresponding button. If the driver doesn't load, then there is either
something wrong with your driver setup or your Java installation.

Enter the name of the user you wish to connect, and mark the checkbox if
this user needs a password.

To be sure that your settings will be saved, press the Apply button.

You can also test the connection by clicking on the appropriate button.
If the connection fails, you will get an error message. If it succeeds,
you will get a message telling you so.

Save your ODB document with an appropriate name.

Once saved, click on the Tables icon in the main Base window, the tables
of your mysql database should appear (if you have defined any in advance).



Alex




-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.