MySQL的Connector/J是否可以与MariaDB一起使用? [英] Does MySQL's Connector/J work with MariaDB?

查看:192
本文介绍了MySQL的Connector/J是否可以与MariaDB一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从此处使用Connector/J连接到我的MariaDB数据库. a>,但这无法正常工作,并且MariaDB日志`

I'm attempting to connect to my MariaDB database using Connector/J from here, but this fails to work and MariaDB logs `

"[警告]与数据库的连接12中止:'enwikt_parsed'用户: 'javawiki'主机:'localhost'(读取通讯时出错 包).

"[Warning] Aborted connection 12 to db: 'enwikt_parsed' user: 'javawiki' host: 'localhost' (Got an error reading communication packets)".

`

在我看来,我只是假设来自MySQL的Connector/J可以与MariaDB一起使用,但是现在我不太确定.我知道MariaDB有自己的Java API/连接器,但是我正在使用其他人的代码来解析维基词典,因此无法使用.

It occurs to me that I just assumed Connector/J from MySQL would just work with MariaDB, but now I'm not so sure. I know MariaDB has their own Java API/Connector, but I'm using someone else's code to parse wiktionary, and therefore can't use it.

在尝试一些更复杂的解决方案之前,我想知道我是否要尝试修复最初不打算以这种方式使用的某些东西.

Before I try some more involved solutions, I'd like to know if I'm trying to fix something that wasn't meant to be used this way in the first place.

推荐答案

是的,MySQL的Connector/J与MariaDB兼容.您需要检查版本.

Yes, MySQL's Connector/J is compatible with MariaDB. You need to check version though.

出于所有实际目的,MariaDB取代了 相同的MySQL版本(例如MySQL 5.1-> MariaDB 5.1,MariaDB 5.2和MariaDB 5.3兼容. MySQL 5.5与MariaDB 5.5兼容,在实践中也与MariaDB 10.0兼容,MySQL 5.6与MariaDB 10.0兼容,而MySQL 5.7与MariaDB 10.2兼容)

For all practical purposes, MariaDB is a binary drop in replacement of the same MySQL version (for example MySQL 5.1 -> MariaDB 5.1, MariaDB 5.2 & MariaDB 5.3 are compatible. MySQL 5.5 is compatible with MariaDB 5.5 and also in practice with MariaDB 10.0, MySQL 5.6 is compatible with MariaDB 10.0 and MySQL 5.7 is compatible with MariaDB 10.2)

引用: https://mariadb.com/kb/zh/library/mariadb-vs-mysql-compatibility/

所有MySQL连接器(PHP,Perl,Python,Java,.NET,MyODBC,Ruby, MySQL C连接器等)对MariaDB保持不变.

All MySQL connectors (PHP, Perl, Python, Java, .NET, MyODBC, Ruby, MySQL C connector etc) works unchanged with MariaDB.

这篇关于MySQL的Connector/J是否可以与MariaDB一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆