About MariaDB Connector/J - MariaDB Knowledge Base [PDF]

The source code is available on GitHub: https://github.com/MariaDB/mariadb-connector-j and the most recent development v

49 downloads 25 Views 128KB Size

Recommend Stories


MariaDB Certification
I want to sing like the birds sing, not worrying about who hears or what they think. Rumi

MariaDB 10.2
Life is not meant to be easy, my child; but take courage: it can be delightful. George Bernard Shaw

MariaDB TX 2.0
Life is not meant to be easy, my child; but take courage: it can be delightful. George Bernard Shaw

MariaDB ColumnStore Datasheet
I want to sing like the birds sing, not worrying about who hears or what they think. Rumi

MariaDB Security Brief
Don't fear change. The surprise is the only way to new discoveries. Be playful! Gordana Biernat

Galera in MariaDB 10.4
You have to expect things of yourself before you can do them. Michael Jordan

MaxScale - MySQL and MariaDB at Web-Scale
The butterfly counts not months but moments, and has time enough. Rabindranath Tagore

Welcome to the MariaDB Developers Unconference
Your big opportunity may be right where you are now. Napoleon Hill

MariaDB: InnoDB foreign key constraint errors - MariaDB.org [PDF]
Aug 7, 2015 - Consider following simple example: create table parent ( id int not null primary key, name char(80) ) engine=innodb; create table child ( id int not null, name char(80), parent_id int, foreign key(parent_id) references parent(id) ) engi

MariaDB AX Helps IHME Manage Multi- Billion Row Tables
What we think, what we become. Buddha

Idea Transcript


Searc h

Knowledge Bas e

Login

Home » Resources » Knowledge Base » Library » Server & Client Software » Client Libraries » Application Programming Interfaces » Java Connector » About MariaDB Connector/J

About MariaDB Connector/J The most recent Stable (GA) release of MariaDB Connector/J is:

MariaDB Connector/J 2.2.1 Download MariaDB Connector/J MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL encoding="UTF-8"?> %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n

The last step is to indicate driver to generate logging, setting options "profileSql" or "log" to true. Exemple of generated logs : 2017-10-04 19:13:44 [main] TRACE o.m.j.i.i.o.StandardPacketOutputStream - send: conn=7548(M) 33 00 00 00 03 49 4E 53 45 52 54 20 49 4E 54 4F 3....INSERT INTO 20 44 72 69 76 65 72 74 33 30 20 28 74 65 73 74 Drivert30 (test 29 20 56 41 4C 55 45 53 20 28 27 72 6F 6C 6C 6D ) VALUES ('rollm 65 62 61 63 6B 27 29 eback') 2017-10-04 19:13:44 [main] TRACE o.m.j.i.i.i.StandardPacketInputStream - read: conn=7548(M) 07 00 00 01 .... 00 01 03 01 00 00 00 ....... 2017-10-04 19:13:44 [main] TRACE o.m.j.i.i.o.StandardPacketOutputStream - send: conn=7548(M) 09 00 00 00 03 52 4F 4C 4C 42 41 43 4B .....ROLLBACK

F.A.Q. Error "Could not read resultset: unexpected end of stream, read 0 bytes from 4" There is an issue communicating with the server. Most of the time this will be caused by reading a query that has a large resultset; the server usually expects clients to read off the result set relatively quickly. The net_write_timeout server variable controls this behavior (defaults to 60s). If the client doesn't read the whole resultset in that amount of time, the server will discard the connection. If you don't expect results to be handled in this amount of time there is another possibility: if your server version >= MariaDB 10.1.2, you can use the query "SET STATEMENT net_write_timeout=10000 FOR XXX" with XXX being your "normal" query. This will indicate that specifically for this query, net_write_timeout will be set to a longer time (10000 in this example). for older servers, a specific query will have to temporarily set net_write_timeout ("SET STATEMENT net_write_timeout=..."), and set it back afterward. if your application usually uses a lot of long queries with fetch size, the connection can be set using the "sessionVariables=net_write_timeout=xxx" option.

How to Do a Lightweight Ping / Avoid Mass "select 1" Connection.isValid() is a good approach. Connection.isValid() is doing a ping (ping in mysql protocol, not network ping). Connection pool using JDBC4 Validation are using automatically this Connection.isValid() ← Getting Started With the Java Connector

­ Java Connector ­

Java Connector Using Gradle Õ

Comments Comments loading... ­ Java Connector ­ Getting Started With the Java Connector About MariaDB Connector/J Java Connector Using Gradle Java Connector Using Maven Failover and High availability with MariaDB Connector/J List of MariaDB Connector/J Releases Option batchMultiSend Description Using TLS/SSL with MariaDB Connector/J MariaDB Connector/J Release Notes MariaDB Connector/J Changelogs Pool Datasource Implementation

Get Started Download MariaDB and start working immediately! You can also get subscription details and learn more about the advantages of MariaDB's additional service offers. Download Now

Products

Services

Resources

About MariaDB

MariaDB Server

Remote DBA

Customers

Investors

MariaDB MaxScale

Technical Support Services

Knowledge Base

Leadership

White Papers

Careers

Datasheets & Guides

Newsroom

Webinars

Partners

Technical Presentations

MariaDB.org

MariaDB ColumnStore Why MariaDB Get Started Pricing Product FAQs Enterprise Subscriptions Comparison

Professional Services Training Technical Account Manager Migration Practice

Blog Books Events Legal Copyright Privacy Policy Cookies Sitemap Copyright © 2017 MariaDB. All rights reserved.

Contact Subscribe to our newsletter!

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.