Monty Program has a MariaDB vs MySQL whitepaper available for download.
See also MariaDB vs MySQL - Features
鉴于所有应用，MariaDB都是MySQL的代码级量身定制的替代者，相应的版本可以直接替换（如MySQL 5.1 -> MariaDB 5.1， MariaDB 5.2 & MariaDB 5.3也是兼容的。MySQL 5.5将与兼容），具体是：
- 所有的MySQL与其他语言（PHP、Perl、Python、Java、.NET、MyODBC、Rub、MySQL C……）的连接文件无需任何改动，在MariaDB就可工作；
同时我们为了容易地从从MySQL 5.0升级到MariaDB 5.1，我们在升级脚本上也做了大量的工作。
MariaDB 5.1与MySQL 5.1不兼容部分
下面列出的是从用户使用角度，你可能看到的MariaDB 5.1与 MySQL 5.1不同之外。
- The installation package names starts with MariaDB instead of MySQL.
- Timings may be different as MariaDB is in many cases faster than MySQL.
- mysqld in MariaDB reads also the
[mariadb]sections of your my.cnf files.
- You can't use a binary only storage engine library with MariaDB if it's not compiled for exactly the same MariaDB version. (This is because the server internal structure THD is different between MySQL and MariaDB. This is common also between different MySQL versions). This should not be a problem as most people don't load new storage engines and MariaDB comes with more storage engines than MySQL.
CHECKSUM TABLEmay give different result as MariaDB doesn't ignore NULL's in the columns as MySQL 5.1 does (Future MySQL versions should calculate checksums the same way as MariaDB). You can get the 'old style' checksum in MariaDB by starting mysqld with the
--oldoption. Note however that that the MyISAM and Aria storage engines in MariaDB are using the new checksum internally, so if you are using
CHECKSUMcommand will be slower as it needs to calculate the checksum row by row.
- The slow query log has more information about the query, which may be a problem if you have a script which parses the slow query log.
- MariaDB by default takes a bit more memory than MySQL because we have by
default enabled the Aria storage engine for
handling internal temporary tables. If you need MariaDB to take very little
memory (at the expense of performance), you can set the value
1M(the default is
- If you are using new command options, new features of MariaDB or new storage engines, you can't move easily back and forth between MySQL and MariaDB anymore.
MariaDB 5.2与MySQL 5.1不兼容部分
The list is the same as between MariaDB 5.1 and MySQL 5.1, with one addition:
SQL_MODEvalue was added:
IGNORE_BAD_TABLE_OPTIONS. If it is not set, using a table, field, or index attribute (option) that is not supported by the chosen storage engine will cause an error. This change might cause warnings in the error log about incorrectly defined tables from the
mysqldatabase, fix that with
For all practical purposes, MariaDB 5.2 is a drop in replacement for MariaDB 5.1 and MySQL 5.1.
MariaDB 5.3与MySQL 5.1、MariaDB 5.2不兼容部分
- A few error messages related to wrong conversions are different as MariaDB provides more information in the message about what went wrong.
- Error numbers for MariaDB specific errors has been moved to start from 1900 to not conflict with MySQL errors.
- Microseconds now works in all contexts; MySQL did, in some contexts, lose the microsecond part from datetime and time.
- MariaDB does more strict checking of date, datetime and timestamp values. For example unix_timestamp('x') now returns NULL instead of 0.
- The old
--maria-startup options are removed. You should use the
--aria-prefix instead. (MariaDB 5.2 supports both
SHOW PROCESSLISThas an extra
Progresscolumn which shows progress for some commands. You can disable it by starting
INFORMATION_SCHEMA.PROCESSLISThas three new columns for progress reporting:
- Long comments which start with
- If you use
max_user_connections=0(which means any number of connections) when starting mysqld, you can't change the global variable anymore while mysqld remains running. This is because when mysqld is started with
max_user_connections=0it does not allocate counting structures (which also involve a mutex for each connection). This would lead to wrong counters if you later changed the variable. If you want to be able to change this variable at runtime, set it to a high value at startup.
- You can set
max_user_connections(both the global variable and the
-1to stop users from connecting to the server. The global
max_user_connectionsvariable does not affect users with the
- The IGNORE directive does not ignore all errors (like fatal errors), only things that are safe to ignore.
MariaDB 5.5与MariaDB 5.3不兼容部分
Percona, the provider of XtraDB, does not provided all earlier features of XtraDB in the 5.5 code base. Because of that, MariaDB 5.5 can't provide them either.
XtraDB options missing in 5.5
The following options are not supported by XtraDB 5.5. If you are using them in any of your my.cnf files, you should remove them before upgrading to 5.5.
- innodb_adaptive_checkpoint ; Use
- innodb_auto_lru_dump ;Use
- innodb_blocking_lru_restore ; Use
- innodb_expand_import ; Use
- innodb_extra_rsegments ; Use
- innodb_pass_corrupt_table ; Use
XtraDB options that has changed default value
|Option||Old value||New value|
New options in XtraDB 5.5
The following new options has been added to XtraDB / InnoDB in 5.5. (Listed here just to have all XtraDB information in the same place)
See also Perconas guide of how to upgrade to 5.5
If you are using any of the following options in your
/etc/my.cnf or other
my.cnf file you should remove them. This is also true for MySQL 5.1 or
Replacing a MySQL RPM
If you uninstalled a MySQL RPM to install MariaDB, note that the MySQL RPM on
After installing MariaDB you should do the following to restore your old configuration options:
mv -vi /etc/my.cnf.rpmsave /etc/my.cnf