[ 
https://issues.apache.org/jira/browse/NETBEANS-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16442690#comment-16442690
 ] 

efrem mccrimon commented on NETBEANS-673:
-----------------------------------------

I agree from that perspective, we should bundle MariaDB connector with 
NetBeans.  I tested the driver version 2.2.3 with both JDK8u162 and JDK10. 

The calling sequence is:
ClassName:  org.mariadb.jdbc.Driver
jdbc:mariadb://localhost:3306/DB?user=root&password=myPassword

Please note that the driver class provided by MariaDB Connector/J is not 
com.mysql.jdbc.Driver but org.mariadb.jdbc.Driver!

The org.mariadb.jdbc.MariaDbDataSource class can be used when the pool 
datasource configuration only permits the java.sql.Datasource implementation.  
Please see the link before for more information.
Documented from https://mariadb.com/kb/en/library/about-mariadb-connector-j/

The format of the JDBC connection string is:
jdbc:(mysql|mariadb):[replication:|failover:|sequential:|aurora:]//<hostDescription>[,<hostDescription>...]/[database][?<key1>=<value1>[&<key2>=<value2>]]
 

Where Host description is:
<host>[:<portnumber>]  or 
address=(host=<host>)[(port=<portnumber>)][(type=(master|slave))]






> Add support for MariaDB JDBC driver in Add Connection dialog
> ------------------------------------------------------------
>
>                 Key: NETBEANS-673
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-673
>             Project: NetBeans
>          Issue Type: Bug
>          Components: db - Code
>    Affects Versions: 9.0
>            Reporter: Eirik Bakke
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: NETBEANS-673 Patch Screenshot Updated.png
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The "Add Connection" wizard does not currently recognize the MariaDB JDBC 
> driver; this means that the "host", "port", and "database" fields do not end 
> up being shown in the connection panel. Instead, the user has to manually 
> construct the JDBC URL to insert this information.
> The fix is simple; a new entry needs to be added in 
> org.netbeans.modules.db.util.DriverListUtil , recognizing the driver class 
> "org.mariadb.jdbc.Driver" (instead of "com.mysql.jdbc.Driver" for MySQL). The 
> MariaDB driver uses the exact same format for its JDBC URLs as MySQL, except 
> allows the protocol name "mariadb" to be used instead of "mysql".
> (MariaDB and its driver aims to be completely compatible with MySQL--either 
> driver can be used to connect to either database. The MariaDB JDBC driver is 
> LGPL while MySQL's driver is GPL, however, making only the MariaDB one 
> suitable for bundling with commercial software.)
> See also https://issues.apache.org/jira/browse/NETBEANS-170, which deals with 
> simplifying the JDBC driver download process.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to