Does MySQL#39;s Connector/J work with MariaDB?(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 `
"[警告] 与 db 的连接 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/连接器,但我正在使用其他人的代码来 parse wiktionary,因此无法使用.
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、MariaDB5.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/en/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 一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL 的 Connector/J 可以与 MariaDB 一起使用吗?


- 在SQL中,如何为每个组选择前2行 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- SQL 临时表问题 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01