libreoffice使用mysql,LibreOffice:无法加载'com.mysql.jdbc.driver'

I am trying to connect LibreOffice Base with an MySQL database, in phpMyAdmin, with a JDBC-connection.

The first step is to select which database you want to select:

6s4EO.png

The second step is to select which connection:

2ZFGi.png

The third step is to select your database:

5WmwJ.png

When I press 'Klasse testen' ( Test Class ), I get the following error: 'com.mysql.jdbc.driver cannot be loaded'.

Does anyone know how to avoid this error?

解决方案

You need to download and "register" the JDBC connector first. To do so:

Go to http://dev.mysql.com/downloads/connector/j/ and download the ZIP archive with the JDBC connector ("Platform-Independent"); you may alternatively download the MSI installer; in this case, the jar file can be found in Program Files (x86)/MySQL/MySQL Connector J/ (assuming a Win 7 64bit system)

Unzip the archive on your local PC (remember the path to its contents), or alternatively install the MSI file;

In the extracted folder structure, there's a file "mysql-connector-java-5.0.8-bin.jar" (name depends on the exact version you've downloaded)

Run LibreOffice (not Base, just LO);

Open Menu Tools -> Options -> LibreOffice -> Advanced -> Class Path;

aNNE5.png

Click Add Archive;

cav6g.png

Select the jar file from step 1-3 and hit OK. Now, the Class Pathdialog should look as follows:

Bmvj0.png

That's it. Now, LO knows where to look for the MySQL JDBC Driver.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值