Re: MariaDB vs MySQL

From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Mon, 27 Oct 2014 16:08:17 +0100
Message-ID: <1o32ib-i9k.ln1_at_xl.homelinux.org>


Bruce Bowler <bbowler_at_bigelow.org> wrote:

> I'm migrating a system from CentOS 6.5, where the database engine was MySQL
> 5.1.73, to a CentOS 7 system, where the engine is MariaDB 5.5.37.
>
> On the 5.1 system I did
>
> mysqldump -u root mysql > mysqlusers.sql
> mysqldump -u user --databases data > dataDef.sql
>
> On the 5.5 system I did
>
> mysql -u root mysql < mysqlusers.sql

This isn't correct. Dumping the complete `mysql` database on MySQL-5.1 and then loading this into MariaDB-5.5 will not work because it involves a lot more than just user accounts. Additionally there are suble incompatibilites in how MySQL-5.1 and MariaDB-5.5 handle advanced topics like pluggable authentication modules.

You can try running mysql_upgrade after loading the `mysql` database into MariaDB. This tool will (try to) convert the 5.1-style system tables to 5.5 ones. Far better would be using a tool like mysqldumpgrants (google it, there are several such tools) to dump the existing MySQL users in form of GRANT statements. Those can be imported into MariaDB-5.5 without compatibility issues.

HTH, XL Received on Mon Oct 27 2014 - 16:08:17 CET

Original text of this message