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
Related
Everything says XAMPP has MariaDB now, but using the latest download link it only has MySQL. Am I missing something? For my needs I'd rather use MariaDB, but can make due with MySQL if need be, but it might create some minor headaches down the road. Is it simply because I'm on Windows?
From the MariaDB Wiki:
MariaDB is a community-developed, commercially supported fork of the
MySQL relational database management system (RDBMS), intended to
remain free and open-source software under the GNU General Public
License. Development is led by some of the original developers of
MySQL, who forked it due to concerns over its acquisition by Oracle
Corporation in 2009.[6]
XAMPP (currently version 7.4.3) ships with MariaDB (currently version 10.4.11)
The current version you're using should come up when logging via the cmd line or if you do a SELECT VERSION();
You can find a full list of differences between MariaDB and MySQL here
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
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.
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.
Ultimately, I want to learn MariaDB. I’ve found that there are hundreds more resources for learning MySQL than for MariaDB. My assumption is that everything I learn from a MySQL book will also apply to MariaDB since it’s a drop-in replacement for MySQL.
From the MariaDB website:
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 will be compatible with MariaDB 5.5).
Will I be able to use MySQL books to prepare for learning MariaDB or will they be useless to me if what I really want to learn is MariaDB?
If you take care about the few differences and incompatibilities (very few, mariadb starts from the same codebase than MySQL), you should have no problem using a resources from one DB and applying them to the other DB.
Even more so if you are mostly focusing in SQL syntax.
You don't really need to care about the differences, unless you are a very advanced user. MariaDB can replace MySQL with every application I know. Some MySQL 5.6 optimizations are not in MariaDB, but much more MariaDB optimizations are not in MySQL.