问题描述
如何向 Eclipse 添加新的 MariaDB 连接?
How can I add a new MariaDB connection to eclipse?
我正在使用数据源资源管理器视图,但是当我尝试创建新的数据库连接时,有 MySQL、Oracle、Informix 的连接...但 MariaDB 没有.
I am using the Data Source Explorer view, however when I try to create a new database connection there are connections for MySQL, Oracle, Informix... but no for MariaDB.
谁能帮帮我?
推荐答案
如果需要为MariaDB创建数据库连接,选择Generic JDBC",点击下一步.
If you need to create a database connection for MariaDB, you choose "Generic JDBC" and click Next.
在下一个窗口中单击新驱动程序定义"按钮,然后从可用驱动程序模板"中选择通用 JDBC 驱动程序"
In next window click on "new driver definition" button then choose "Generic JDBC Driver" from "Available driver templates"
在JAR 列表"中,添加 Maria 连接器.您可以从 (https://downloads.mariadb.com/enterprise/152y-977s/connectors/java/connector-java-1.4.6/mariadb-java-client-1.4.6.jar).我用了mariadb-java-client-1.4.6.jar"
In "JAR List", add the Maria connector. You can get it from (https://downloads.mariadb.com/enterprise/152y-977s/connectors/java/connector-java-1.4.6/mariadb-java-client-1.4.6.jar). I used "mariadb-java-client-1.4.6.jar"
在属性"中,输入以下数据
In "Properties", enter the following data
Connection URL: jdbc:mariadb://localhost:3306/database_name
Database Name: database_name
Driver Class: org.mariadb.jdbc.Driver
您可以将用户 ID 设置为空并验证数据库的用户名和密码.测试它是否连接.
You can set User ID to empty and validate username and password of your database. Test if it connects.
这篇关于Eclipse - 如何添加新的 MariaDB 连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!