Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can MySQL seamlessly be replaced with MariaDB or are there things to change in this case?

If I replace a MySQL 5.1 server with a MariaDB Server (Maria & XtraDB storages) instead of MySQL (MyISAM & InnoDB), will most of MySQL client software (incl. applications made with PHP 5.2 and Java SE 1.6) ...

  1. just remain working without any changes (with minor regressions maybe)?
  2. Or will I have to replace/reconfigure client drivers (like use another JDBC driver class and connection string)?
  3. Or will I have even to change application code?
like image 264
Ivan Avatar asked Nov 05 '10 13:11

Ivan


People also ask

Can MariaDB replace MySQL?

Since MariaDB works as a straight swap for MySQL, you should have no trouble uninstalling MySQL, installing MariaDB in its place, then connecting (so long as the file versions are the same).

Why did MySQL change to MariaDB?

It was launched in the year 2009, as a lighter and improved version of MySQL. MariaDB is more reliable, provides better performance, and handles complex data much better. MariaDB works on SQL and supports all the rules and functions of SQL. It offers better storage options than its competitors.

Is MariaDB same as MySQL?

MariaDB vs MySQL Differences Even though MariaDB is a fork of MySQL, these two database management systems are still quite different: MariaDB is fully GPL licensed while MySQL takes a dual-license approach. Each handle thread pools in a different way. MariaDB supports a lot of different storage engines.

Can you have MySQL and MariaDB?

Yes, it is. Just as two MySQL instances can coexist. MariaDB is still a drop-in replacement. By port or by different socket path, and install MariaDB to a non-standard directory.


2 Answers

http://kb.askmonty.org/v/mariadb-versus-mysql

All MySQL connectors (PHP, Perl, Python, Java, MyODBC, Ruby, MySQL C connector etc) works unchanged with MariaDB.

like image 177
Qwerty Avatar answered Sep 30 '22 03:09

Qwerty


I have used Mariadb as replacement for Oracle's MySQL for years. It is faster and very reliable. Needs just little attention in apt, but nothing severe. Also, there is one small detail with Mariadb; it is seeing [error] "PHP Warning: mysql_connect(): Headers and client library minor version mismatch" in the logs. I haven't found any other solution to that other than to start manually compiling: askMonty.

$php -i | grep 'Client API'  Client API version => 5.3.7-MariaDB Client API library version => 5.3.7-MariaDB Client API header version => 5.1.61 Client API version => 5.3.7-MariaDB 
like image 45
Peter Avatar answered Sep 30 '22 02:09

Peter