Differences between revisions 4 and 5
Revision 4 as of 2013-09-03 12:17:31
Size: 3517
Editor: ?OttoKekalainen
Comment:
Revision 5 as of 2013-09-03 12:20:43
Size: 3521
Editor: ?OttoKekalainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * Simply writing '''apt-get install mariadb-server''' will install MariaDB 5.5.x and replace any existing MySQL 5.5.x installation and inherit the databases and configuration files of it. Installing mysql-server will do the opposite and running mysql-server will work in almost all cases (with the rare exception being if my.cnf contains something MariaDB-specific).  * Simply writing '''apt-get install mariadb-server''' will install MariaDB 5.5.x and replace any existing MySQL 5.5.x installation and inherit the databases and configuration files of it. Installing mysql-server will do the opposite. Also running mysql-server will work in almost all cases (with the rare exception being if my.cnf contains something MariaDB-specific).
Line 16: Line 16:
* Once MySQL 5.6 enters Debian, MariaDB using /var/lib/mysql might become a huge problem. Perhaps we should NOT have them automatically share data or at least force the migration to be one-way so that installing MySQL 5.6 after MariaDB 5.5 would raise warnings.
* Should MariaDB packages depend on empty package mariadb-common, which in turn depends on mysql-common? This will allow divergence in the future (such as when we have MySQL 5.6).
 * Once MySQL 5.6 enters Debian, MariaDB using /var/lib/mysql might become a huge problem. Perhaps we should NOT have them automatically share data or at least force the migration to be one-way so that installing MySQL 5.6 after MariaDB 5.5 would raise warnings.
 * Should MariaDB packages depend on empty package mariadb-common, which in turn depends on mysql-common? This will allow divergence in the future (such as when we have MySQL 5.6).

Current master (for debian/* packaging) at: https://github.com/ottok/pkg-mariadb

Pending upload at: https://mentors.debian.net/package/mariadb-5.5

How MariaDB works:

  • Simply writing apt-get install mariadb-server will install MariaDB 5.5.x and replace any existing MySQL 5.5.x installation and inherit the databases and configuration files of it. Installing mysql-server will do the opposite. Also running mysql-server will work in almost all cases (with the rare exception being if my.cnf contains something MariaDB-specific).

  • MariaDB packages mariadb-client and mariadb-server have in the control files Provides+Breaks+Replaces for equivalent MySQL packages, so that it is impossible to install both at the same time. This is true for any other MariaDB package too as long as it contains files that has same (and thus conflicting) file names and paths as in equivalent MySQL packages.

  • Upstream MariaDB 5.5.x advertises to be a binary-compatible replacement for MySQL 5.5.x (but not anymore in MySQL 5.6 vs. MariaDB 10.0). Anything that works with MySQL 5.5 will work with MariaDB 5.5. Migrating from MySQL 5.5. to MariaDB 5.5. will always work. The contrary might not always be true, as at least MariaDB 5.5 libraries (/usr/lib/x86_64-linux-gnu/libmariadbclient.so.18.0.0) have more symbols than the MySQL version.
  • Possible "interfaces" of MySQL 5.5 are the server and client binaries (can be used e.g. in shell scripts), the actual server interface (used remotely via port 3306 or locally via socket /var/run/mysqld/mysqld.sock) and the binary interfaces (/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0 and some symbolic links to it, installable from package libmysqlclient18). MariaDB has all of these, plus the extra libmariadbclient18.x.

  • As upstream MariaDB 5.5 is quite a young fork of MySQL, all of the internal file names still have mysql in them, the database files are in the same location, the configuration file /etc/mysql/my.cnf is the same, the port 3306 is the same etc.

  • In Debian packages, libmysqlclient.so has been renamed to libmariadbclient.so to enable both versions to be installable side-by-side. Initial checking did not find that MySQL nor MariaDB would themselves use the shared libs, but have their own libs statically linked in. These shared libs are meant only for third party usage, and the libs themselves will use whatever server is installed (MySQL or MariaDB).

  • MariaDB 5.5 can always use a my.cnf that originates from MySQL 5.5, but it might not work the other way around if the user has added some MariaDB-specific parameters in the my.cnf.
  • The package mysql-common does not have any equivalent mariadb-common, but MariaDB packages depend on mysql-common. The default my.cnf should always be compatible with all MySQL and MariaDB versions (5.5, 5.6, 10.0 and foreseeable future). Any options which are unique to one or the other must never appear in a shipped my.cnf.

Open questions:

  • Once MySQL 5.6 enters Debian, MariaDB using /var/lib/mysql might become a huge problem. Perhaps we should NOT have them automatically share data or at least force the migration to be one-way so that installing MySQL 5.6 after MariaDB 5.5 would raise warnings.
  • Should MariaDB packages depend on empty package mariadb-common, which in turn depends on mysql-common? This will allow divergence in the future (such as when we have MySQL 5.6).