Mysql-connector-java Mariadb

2 views
Skip to first unread message
Message has been deleted

Joseph Zyiuahndy

unread,
Jul 17, 2024, 6:54:22 PM7/17/24
to plexastiapink

MariaDB connector was my fault. I was trying to use com.mariadb.jdbc.Driver. org works fine. Also confirmed my suspicions - mariadb-java-client-1.5.7.jar can be located wherever wanted. I keep it in my home directory. Also confirmed MariaDB works with SQL Workbench/J (I use this more than any other). Good news as there is a lack of good tools (my opinion) for it in Linux.

On Linux Debian copy this jar file into /usr/share/java/. (I had a hard time finding where to copy it to. Another post suggested this location. Perhaps you could search your system for jar files. Or perhaps someone else can suggest how to determine where to put it.

mysql-connector-java mariadb


Descargar archivo https://lpoms.com/2yOH5j



On Windows copy this jar file into C:\Java\ (This is the suggested location, and because it is processor independent, it makes more sense than putting it into either of the two normal program file locations, i.e. C:\Program Files (x86)\ (which holds 32 bit programs) or C:\Program Files\ (which holds 64 bit programs).

Tip: From here, there are two different ways to proceed: You can simply select a) JDBC, or b) you can firsts select MySQL and then JDBC. Method "a: allows you to view, open and edit your tables, but has a bug and does not allow table-to-table relationships to be viewed, edited, or work properly in subforms. If you choose method a you will get this error message when you select Tools,Relationships...

@EasyTrieve Just a correction. Retested 1.2.0 connector and it worked without a problem on Debian with MariaDB. Seems the first time I tried this it failed because there actually was NO Native connector present. I also found my copy of the .otx so I have it if needed.

@Easytrieve The aforementioned Native connector works in connecting to AOO, and again, it is much faster than JDBC connection. Also, using mysql-connector-java-5.1.35-bin.jar I had no problem with JDBC connection leaving com.mysql.jdbc.Driver as is.

ODF is a generic term not an actual file extension. It stands for Open Document Foundation or Open Document Format depending on the context. So an ODF spreadsheet has an extension .ods for example, an ODF database. odb, and so on. LO and OO both use ODF formats by default

The MySQL extension requires the MySQL Connector/J library or MariaDB Connector/J library, neither of which are included in the Druid distribution.Refer to the following section for instructions on how to install this library.

Depending on the MariaDB client library version, the connector supports both jdbc:mysql: and jdbc:mariadb: connection URIs. However, the parameters to configure the connection vary between implementations, so be sure to check the documentation for details.

Thanks for your response, it was very helpful. Especially from the context of identifying the correct location to download the MariaDB JDBC drivers. At one time I had the correct location, but evidently lost it.

"By the way: There is a direct connection available for connecting Base with MariaDB."
Yes, I have the direct connection working. Getting the JDBC driver working was an educational objective to learn more.

Unfortunately, I was unable to get mariadb-java-client-2.7.9.jar or mariadb-java-client-3.1.3.jar to work. The following JDBC does work: mysql-connector-j-8.0.33.jar. So from that perspective, this question is solved.

not com.mysql.jdbc.Driver or for newer MySQL driver com.mysql.cj.jdbc.Driver
Have a look here: Base Guide - English
Original is from older German Base Handbuch I wrote. All I have written above will be available also in German Base Handbuch 7.6.

PS I should mention that I ran into this during a rebuild of my workstation after an SSD crashed, so bearing in mind the law of parsimony I was wary that whatever was causing the problem may be due to software misconfiguration on my system rather then an actual fault in the tools.

I see at the linked github issue #2431 they announced the problem appears to be fixed, and I can now build and run the 3.0.4 version of the driver from Release MariaDB Connector/Java 3.0.4 mariadb-corporation/mariadb-connector-j GitHub and use it against MariaDB via Liquibase with no NULL error. It has also fixed my problem with browsing the database schema in SquirrelSQL.

MariaDB documentation says : Please note that the driver class provided by MariaDB Connector/J is not com.mysql.jdbc.Driver but org.mariadb.jdbc.Driver! but when I changed driver class in my logstash config file it still doesn't work.

The connector itself is a single file named mysql-connector-java-X.X.XX-bin.jar.Extract this file from the downloaded archive to a location on your hard drive that is accessible from RapidMiner Studio.

If the driver classes for both the bundled and the newly created connectors is com.mysql.jdbc.Driver the MySQL Connector/J is being used.If it is org.mariadb.jdbc.Driver, the bundled MariaDB Connector/J is used.

I need to change my database driver from MySQL 5.7.26 to the latest MariaDB driver 10.5.8. And now queries with CASE statements that should return a Long instead return a BigDecimal. Big trouble since (= 0 0M) is false.

The following function demonstrates the problem. It takes a db connection, creates a table with one integer field, inserts one row with the value 1 and then queries the table using a CASE statement that returns the row. Using the MySQL connection, the value returned is 1 and using the MariaDB connection, the value returned is 1M.

@seancorfield. Thanks! I was actually not able to use the jdbc driver for MariaDB. Neither
:dbtype "mariadb" nor jdbc:mariadb://, even though I included [org.mariadb.jdbc/mariadb-java-client "2.7.2"] in my project.clj. So I used the mysql driver instead.

Would you go as far as to say that you cannot trust the types of return values from databases and need to coerce types before letting them into your code? Or is it enough to spec and check in production code?

This is also why it can be important to ensure that your test suites use the same version of the JDBC driver and the same version of your database (even when it is convenient and tempting to run tests against, say, an in-memory DB like H2 or a local DB like Derby or SQLite).

I use the kettle to connect the mysql database,the version of the kettle is 7.0 and the version of the mysql is 8.0.12. I have put the mysql-connector-java-8.0.12.jar in the lib folder. when I establish the database repository bu using the mysql database , it create a problem,the detail is as follows:

So I use kettle of version 7.1, and I download the mariadb-java-client-2.3.0.jar. It seems didn't work, can you tell me the version of kettle and MariaDB JDBC Driver you use. The error detail is as follows:

This post will guide you step-by-step how to connect JDV to a MariaDB/MySQL database using Teiid Designer. We will connect to a MariaDB 10.1 server using MySQL Connector/J 5.1, a JDBC driver for communicating with MariaDB/MySQL servers. Indeed, you can follow this same tutorial with a MySQL instance.

In this example, we will connect to a database called "unlockdata" with the username/password "mysql_dev/mysql_dev".
Note: If you are running on RHEL, be aware that MariaDB/MySQL is available via Software Collection.

JDV requires access to the following jar file to successfully use the MySQL Connector/J 5.1 JDBC driver to connect to MariaDB/MySQL database, you can download it from the MySQL Connector/J Driver and extract it.

For your convenience most of the steps are automated in an ansible playbook called mariadb_mysql on github and to run you only need to run one command and you should see similar output as shown below:

We are now going to use the MySQL JDBC driver directly and import metadata directly using the JDBC importer. Right-click the project "MySQLSample" and select Import and select "JDBC Database >> Source Model" as shown above and click "Next >".

On the first page of the wizard, click "New..." to create a new Connection Profile. Before we can proceed we need to setup a new connection profile to be able to connect to the MariaDB server using the JDBC jar previously downloaded.

Now we are ready to federate this data with other data-sources from physically distinct systems into such as other SQL databases, XML/Excel files, NoSQL databases, enterprise applications and web-services etc.

It is as if the tDBInput_1 having to use the driver for mysql 5 (com.mysql.jdbc.Driver) uses that of mysql 8 (com.mysql.cj.jdbc.Driver) as indicated in the error output (I don't know if that means anything...)

For the connectors i did not install those by myself, in fact when i use a schema as input from the mysql 5 database connection and another as output from the mysql 8 one and then build the job for deploying purposes, i notice there are these two connectors in the lib directory, and after executing the job i notice that the "GC over limit exceeded" concerns the tmysqlInput (which has "enable stream" option activated ) and the exception mentions "... at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) "; the "..cj.." shows that the mysql 8 driver is used in this case ...

But my main trouble is why i am getting this "GC overhead limit exceeded" error , since i have enough memory allocated to the job and the "enable stream " option activated, i was always proceeding in this way without any error and this time it is not working ...

how can i safely force talend ( open studio 7.3.1) to use only the mysql-connector-java-8.0.18.jar (for both mysql 5 and mysql 8 components/connexion) as far as the two connectors are already installed on ?

After having built a job in which i use both MySql 5 and MySql 8 , i deleted mysql-connector-java-5.1.30-bin from the lib folder and let the mysql-connector-java-8.0.18 there, but i got an error telling that it can't find the class com.mysql.jdbc.Driver (from mysql-connector-java-5.1.30-bin).

Talend is using in some cases mysql-connector-java-5.1.30-bin and in other ones mysql-connector-java-8.0.18, how can i force it to use only one connector without breaking anything in my previous jobs ?

d3342ee215
Reply all
Reply to author
Forward
0 new messages