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.
Related
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.
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
I am totally new to databases. I would like to create a database; I am going to make a small project which is going to use DB. I am going to use Maria DB as it is totally free for commercial use.
The question is: Can I use MySQL workbench program to create a database and then transform/change it to MariaDB?
From my experience -- Sure, you can use MySQL Workbench with MariaDB.
However, I have tried basic functionalities only, like queries, schema design etc. Not sure about compatibility of advanced features.
So my experiences are, yes you can use MySQL Workbench for MariaDB database designs.
However I needed to change the "Default Target MySQL Version" to 5.7.
This can be done by going to: Edit->Preferences in the menu. And finally to Modeling->MySQL.
Since the latest MySQL version, v8.x, the SQL statements are not compatible with MariaDB statements (like creating an index). MariabDB creating an index on a table:
INDEX `fk_rsg_sub_level_rsg_top_level1_idx` (`rgs_top_level_id` ASC)
vs
MySQL:
INDEX `fk_rsg_sub_level_rsg_top_level1_idx` (`rgs_top_level_id` ASC) VISIBLE
MariaDB can't handle this VISIBLE keyword in this example. Using an old MySQL Version, MySQL Workbench will forward engineer a compatible MariaDB SQL file.
Currently (Oct 2019) the generated SQL_MODE output is still compatible with MariaDB. Just like InnoDB, which is also preferred when using MariaDB in most cases.
Just to list a few other options:
MySQL Workbench
Heidi Sql
SQLyog
No.
The latest version of Workbench 8.0 is not supported in MySQL.
Yes, although connecting to view existing database on a remote MariaDB server will crash the current client (6.3.10). I use it mainly to deploy database models and that works fine, even on remote servers.
I just deployed to a MariaDB 10.3 server with that client and it worked fine, see screenshot.
Recent events are moving away developers from MySQL to alternatives such as MariaDB. (It seems I'm one of them).
how painful is the migration and further support Doctrine2 is there?
MariaDB is direct replacement for MySQL at the same version level
So there is no MySQL 5.5 equivalent yet.
See the MariaDB KnowledgeBase
I am doing a research regarding migrating from MySQL to MariaDB and viceversa.
As it seems, the first part should be easy and not complicated as stated here: MariaDB versus MySQL - Compatibility
It is the "viceversa" part that botters me: MariaDB -> MySQL. I just could not find anything useful about this topic.
Can anyone help? Any advice, hint? Are there complications migrating from MariaDB back to MySQL?
Thank you so much.
If there is someone who should ever take care of migrating from MariaDB to MySQL, it would be Oracle. As Oracle pretends MariaDB does not exist (company politics-policies) , it also does not provide the possibility to migrate (which does not bother me personally, because being on MariaDB team I'd prefer people to chose it and stay there :)
Having said all the above, the migration should be straightforward, provided you do not use special features (so, no storage engines besides MyISAM/Innodb). You shutdown MariaDB, you save the data directory, remove MariaDB, install MySQL, copy the saved data directory back. In the worst case you'd need to remove parameters from my.ini/my.cnf that are not recognized by MySQL.
The point I'm trying to make is since persistent data formats for most commonly used storage engines are compatible, no data migration is required (at least not yet:)
It's very easy ton migrate Mysql to MariaDB (so, no storage engines besides MyISAM/Innodb).
Backup your database
Stop mysql server
Set your repositorie
(http://downloads.mariadb.org/mariadb/repositories/), it's depend on your linux stack.
Execute commande line to install MariaDB.
But now migrate MariaDB to Mysql is more difficult. I have no solution yet for this operation. Since my last try i have crashed my server...