How to know MySql Version from Version of 10.4.14-MariaDB - mysql

when I check my mysql version , I see that I have 10.4.14-MariaDB but I know the last version is 8 so how to explain that?

MariaDB 10.2, MariaDB 10.3, and MariaDB 10.4 function as limited drop-in replacements for MySQL 5.7, as far as InnoDB is concerned. However, the implementation differences continue to grow in each new MariaDB version.
MariaDB 10.0 and MariaDB 10.1 function as limited drop-in replacements for MySQL 5.6, as far as InnoDB is concerned. However, there are some implementation differences in some features.
MariaDB 5.5 functions as a drop-in replacement for MySQL 5.5.
MariaDB 5.1, MariaDB 5.2, and MariaDB 5.3 function as drop-in replacements for MySQL 5.1.
source: https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/

Related

How to upgrade mariadb from a sql dump file?

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

Does MySQL's Connector/J work with MariaDB?

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.

Incompatibility between MySQL and MariaDB - Subquery in FROM clause.

MariaDB claims to be a drop-in replacement for MySQL, but MySQL docs states that this feature is available since version 5.7.7:
Before MySQL 5.7.7, the SELECT statement cannot contain a subquery in
the FROM clause.
MariaDB knowledge base says this is not allowed:
The SELECT statement cannot contain a subquery in the FROM clause.
However, this is not listed in MariaDB's compatibility page.
I've made some tests and it seems like there's no support for this kind of query in MariaDB, but the conflicting information in MariaDB docs made me confused. So, which one of the pages from MariaDB is right? Is this feature really not supported (yet)?
If you conducted the tests yourself on the latest version of MariaDB (mysql v5.7.7 was released in April 2015, so it is not new, nevertheless you should test the latest MariaDB) and the result was that MariaDB instance did not support subqueries in the from clause of views, then this what it is.
Yes, it should probably highlighted in the differences section. You may consider raising a bug report around the documentation being incorrect. Since the MariaDB manual on views is accurate, this is a documentation issue only. Just make sure that you did test the latest MariaDB version.
Looks like it's been implemented in 10.2.x (since 10.2.1) which currently is at 10.2.5 RC (release candidate).
https://mariadb.com/kb/en/mariadb/mariadb-1021-release-notes/
MariaDB does not implement subqueries in the FROM clause of a view yet because it's based on a version of MySQL that does not implement that feature.
https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ says in part:
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).
(emphasis mine)
Not all features of MySQL 5.6, 5.7, or later are implemented in MariaDB. The documentation is pretty clear about the compatibility.
MariaDB is a fork of MySQL 5.5, which was released in 2010. So MariaDB should be backward-compatible and a "drop-in replacement" of that major version of MySQL.
Since then, MySQL has released major versions 5.6 and 5.7, and is currently developing the next version which they have numbered 8.0.
MariaDB has back-ported a few features from MySQL 5.6 and 5.7, but clearly not all features of MySQL 5.6/5.7. It has therefore diverged from compatibility with MySQL, and the differences will get larger as time goes on.

What exactly is the difference between MySQL and MariaDB?

The previous versions of XAMPP would include MySQL. Now they include MariaDB.
I used to use the previous versions but now I upgraded XAMPP and it has MariaDB.
So what exactly is the difference between them? Or are they both similar?
What changes should I make in my programming approach?
Should I switch over to the previous version?
According to the MariaDB documentation:
Until MariaDB 5.5, MariaDB versions functioned as a "drop-in replacement" for the equivalent MySQL version, with some limitations. From MariaDB 10.0, it is usually still very easy to upgrade from MySQL.
[...]
This means that for many cases, you can just uninstall MySQL and install MariaDB and you are good to go. There is not generally any need to convert any data files.
Note also that according to the same documentation page:
However, the implementation differences continue to grow in each new MariaDB version.
To know the exact differences between MySQL and MariaDB versions, see the specific pages in the documentation:
Incompatibilities and Feature Differences Between MariaDB 10.5 and MySQL 8.0
Incompatibilities between MariaDB 10.4 and MySQL 8.0
Incompatibilities between MariaDB 10.3 and MySQL 5.7
Incompatibilities between MariaDB 10.2 and MySQL 5.7
You can also check this answer on Software Engineering Stack Exchange

Mysql SET OPTIONS on version 5.6+

Ifter upgrading Mysql server from 5.5 to 5.7 we found that query 'SET OPTION' is deprecated. We asked our system's developers and they said that they are not plannig any updates to support newer mysql versions.
What can we do now? Is there any way to bypass this deprecated query?
I thinking we can set another server instance with version 5.7 replicating from old server 5.5.