Doctrine2 MariaDB integration - mysql

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

Related

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.

Are mysql server 5.6 and mysql (client) 5.5 full compatible?

I am bit novice in some aspects here and no related information found...
I have an AWS instance with mysql client installed at 5.5 version. And also an RDS db instance with mysql 5.6 (in order to use t2.micro). I don't think so but, could this in your opinion/experience produce some kind of trouble when requesting queries (via PHP, specifically Symfony2) between them?
I hope it is no; but if yes, is strictly necessary then to upgrade my mysql client in the instance or there is any other way to use t2.micro with mysql server at 5.5?
Any guidance or related experience would be much appreciated.
See Upgrading from MySQL 5.5 to 5.6:
Note particularly any changes that are marked Known issue or
Incompatible change.
That said, your client app should be able to use 5.6 safely, and you got it right, that is required to use db.t2.micro instances.

Can I use the MySQL books I already have to learn MariaDB?

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.

Which versions of mysql can MySQL Workbench 6.0.9 connect to?

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.

Can I use MySQL Workbench to create MariaDB?

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.