I'm attempting to connect to my MariaDB database using Connector/J from here, but this fails to work and MariaDB logs `
"[Warning] Aborted connection 12 to db: 'enwikt_parsed' user:
'javawiki' host: 'localhost' (Got an error reading communication
packets)".
`
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.
Yes, MySQL's Connector/J is compatible with MariaDB. You need to check version though.
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)
Refer : https://mariadb.com/kb/en/library/mariadb-vs-mysql-compatibility/
All MySQL connectors (PHP, Perl, Python, Java, .NET, MyODBC, Ruby,
MySQL C connector etc) works unchanged with MariaDB.
Related
Maintenace tasks such as servers status, client connections etc call come up with the same error.
The version of the server you're trying to connect to is 10.0, which is not supported by Workbench.
Is there a quick hack to allow the use of these with Mariadb 10.04 or 10.06
MySQL Workbench checks for the specific version of the server since each version supports a different set of configuration options. E.g. some 5.6 options must not be set on a 5.5 server.
MariaDB is not officially supported. It could be possible to hack the version check to make it pass with 10.0, but much with the differences between the fork and the original MySQL versions there is a chance that you could run into errors or break your server's configuration. The settings in MariaDB are not 100% compatible.
For that reason it is recommended to use a different tool that has dedicated support for MariaDB.
Perhaps it's a silly question, but at least for me is not that obvious. Perhaps for the naming.
I'm trying to figure out what is the correct package I'm need to use to connect my R code to a MySQL database.
I've read in the RMySQL package that:
NOTE: this package is being phased out in favor of the new RMariaDB package.
So in other words, from now on do I need to use RMariaDB package even if I'm connecting to MySQL or MySQL support is going to be dropped at some point since the databases are diverging a little bit on each version.
I specially ask in the context of MySQL 8.
Thanks!
Yes, you should use RMariaDB instead of RMySQL.
Both RMariaDB and RMySQL are using the same database driver, the MariaDB Connector/C client library for client/server communication:
MariaDB Connector/C supports all MySQL and MariaDB specific authentication methods, so connecting to a MySQL 8.0 database server shouldn't be a problem.
Beside the X-Protocol, which isn't used in R, MariaDB Connector/C also supports all MySQL specific api features.
RMariaDB supports text and binary protocol for client/server communication. Differences between MySQL and MariaDB binary protocol are handled in MariaDB Connector/C, text protocol is still the same.
RMariaDB will be a replacement for RMySQL, so in near future you will not get bug or security fixes for RMySQL anymore.
I have a sql dump file generated by mysqldump of mariadb 10.2.
I want to set up a new db server using mariadb 10.4 with data coming from the sql dump file.
Is the upgrade process necessary in this case? If so, should I first restore the sql file into db and then run mysql_upgrade or somehow directly upgrade the sql file and then restore into the db?
Well I would suggest that you follow the upgrade guides given on the MariaDb website. See Upgrading MariaDB. It lists articles on upgrading from one major version of MariaDb to the next.
There is no guide for directly upgrading from version 10.2 to 10.4, so you should first upgrade from 10.2 to 10.3 by following Upgrading from MariaDB 10.2 to MariaDB 10.3. Then upgrade from 10.3 to 10.4 by following Upgrading from MariaDB 10.3 to MariaDB 10.4.
Make sure to read the incompatibilities between the major versions
I need to convert a mysql database to postgres. Just for testing, I installed a local mysql database and created a simple test database with one table. Now I wan't to make a SQL dump with the option --compatible=postgresql:
mysqldump test --compatible=postgresql -uroot > ~/Documents/testdump.sql
But I always get the following error message:
Invalid mode to --compatible: postgresql
I'm using OSX and installed mysql using homebrew
the mysql version is: stable 8.0.12 (bottled)
I also tried it with the Docker-container and the newest version 8.0.12 but it also gives me the same error message. I need the compatible mode so I can use the dump with an python script to convert it to postgresql.
Edit:
I downgraded to 5.7 and it's now working - I'm still wondering why it's not working with the new version.
If you check the documentation for MySQL 8, you will find this:
--compatible=name
Produce output that is more compatible with other database systems or
with older MySQL servers. The only permitted value for this option
is ansi, which has the same meaning as the corresponding option for
setting the server SQL mode.
So setting the value of name to postgresql won't work.
https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_compatible
For 5.7 the following values are possible, which is the reason that a downgrade enabled you to use the desired value:
--compatible=name
Produce output that is more compatible with other database systems or
with older MySQL servers. The value of name can be ansi, mysql323,
mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options,
no_table_options, or no_field_options.
I've scoured the MySql website to see if they have compatibility listings for MySQL Workbench, but have not found anything. Does anyone know if 6.0.x can connect to 5.5.x databases? I'd rather not install and then have to roll back.
MySQL Workbench can connect to most MySQL server versions, but that is probably not the primary question. You should rather ask what minimum version it can work with. MySQL Workbench requires at least MySQL 5.0 and can work with any MySQL server after that (including the new 5.7). Some features like authentication plugin or performance schema support require higher server versions, though.