LibreOffice:无法加载"com.mysql.jdbc.driver" [英] LibreOffice: 'com.mysql.jdbc.driver' cannot be loaded
问题描述
我正在尝试使用JDBC连接将LibreOffice Base与phpMyAdmin中的MySQL数据库连接.
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:
第二步是选择哪个连接:
The second step is to select which connection:
第三步是选择数据库:
The third step is to select your database:
当我按下'Klasse testen'(Test Class)时,出现以下错误:'com.mysql.jdbc.driver无法加载'.
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?
推荐答案
您需要先下载并注册" JDBC连接器.为此:
You need to download and "register" the JDBC connector first. To do so:
-
转到 http://dev.mysql.com/downloads/connector/j/并使用JDBC连接器(与平台无关")下载ZIP归档文件;您也可以下载MSI安装程序;在这种情况下,可以在
Program Files (x86)/MySQL/MySQL Connector J/
(假设使用Win 7 64位系统)中找到jar文件
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)
在本地PC上解压缩存档(记住其内容的路径),或者安装MSI文件;
Unzip the archive on your local PC (remember the path to its contents), or alternatively install the MSI file;
在提取的文件夹结构中,有一个文件"mysql-connector-java-5.0.8-bin.jar"(名称取决于您下载的确切版本)
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)
运行LibreOffice(不是Base,只是LO);
Run LibreOffice (not Base, just LO);
打开菜单Tools
-> Options
-> LibreOffice
-> Advanced
-> 类路径;
Open Menu Tools
-> Options
-> LibreOffice
-> Advanced
-> Class Path;
单击添加存档;
从步骤1-3中选择jar文件,然后按 OK .现在,Class Path
对话框应如下所示:
Select the jar file from step 1-3 and hit OK. Now, the Class Path
dialog should look as follows:
就是这样.现在,LO知道了在哪里寻找MySQL JDBC驱动程序.
That's it. Now, LO knows where to look for the MySQL JDBC Driver.
这篇关于LibreOffice:无法加载"com.mysql.jdbc.driver"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!