Migrate from MySQL 5.6 to MariaDB 10.0 on CentOS 6.x

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,354
Does anybody have experience in migrating from MySQL 5.6 to MariaDB 10.0 on CentOS 6.x using Custombuild 2.0? Is it even possible without running CentOS 7? And is it needed to dump and import all databases after the migration? If so, how did you do that without manually dumping and importing one and one database at the time?
 
My config is like this:
Code:
#MySQL Settings
mysql=5.6
mariadb=10.0
mysql_inst=no
mysql_backup=yes
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no
But strange thing is I don't have MySQL installed, but MariaDB.

And it's Debian 8.2 fresh installation.
 
#MySQL Settings
mysql=5.6
mariadb=10.0
mysql_inst=mariadb
mysql_backup=yes
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no
 
Hello,

Somewhere here it was posted that to migrate back from MariaDB 10.0 to MariaDB 5.5 or even MySQL you will need dump/restore all DBs. There is no other way for a migration.

You can switch binaries from MySQL 5.5 to MariaDB 5.5 (and reverse) without issues in most cases.
 
Last edited:
@zEitEr, There is no MariaDB 5.6, it is only MariaDB 5.5 and 10.0. MariaDB 10.0 is the equal to MySQL 5.6

My question is if it is needed to dump and re-import all databases if you migrate from MySQL 5.6 to MariaDB 10.0?
 
Thanks ditto, I've corrected my post. They say here: https://mariadb.com/blog/how-migrate-mysql-mariadb-linux-five-steps :

The simplest method follows these steps:

  1. Update your software repositories list with the MariaDB repos
  2. Update your Linux package manager with the new repos
  3. Stop MySQL
  4. Install MariaDB with your package manager
  5. Go back to work because you're done
And still they suggest that you make sure you have current backups (which you should have anyway) before you do anything.
So you can do a binary replacement when migrating from MySQL to MariaDB.
 
Thank you for the information zEitEr. Now I just wonder if Custombuild 2.0 will take care of step 1 to 4 in your post when I change the options-file in custombuild to use MariaDB 10.0 on CentOS 6.x (previous using MySQL 5.6) and do a ./build update and ./build mariadb? Maybe smtalk can answer that?
 
There is nothing unusual in those 5 steps. They are performed by custombuild every time when you upgrade MySQL/MariaDB version for the exception of changing repo. Custombuild does not use OS repos but downloads rpm packages from their own file servers. With Custombuild you also will have mysql_upgrade executed in the end of installation. So here you should be safe. Just make sure to have mysql backups enabled in options.conf.
 
Hi zEitEr, thanks for replying.

I just upgraded my DA from MySQL to MariaDB, all went smooth and seamless..

Code:
root@aetheryte:/usr/local/directadmin/custombuild# ./build mysql
--2015-09-13 17:02:01--  http://files2.directadmin.com/services/all/mariadb/10.0/10.0.21/mariadb-10.0.21-linux-x86_64.tar.gz
Resolving files2.directadmin.com (files2.directadmin.com)... 208.167.226.3
Connecting to files2.directadmin.com (files2.directadmin.com)|208.167.226.3|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 309725251 (295M) [application/x-gzip]
Saving to: `mariadb-10.0.21-linux-x86_64.tar.gz'

100%[===========================================================================

2015-09-13 17:02:11 (31.0 MB/s) - `mariadb-10.0.21-linux-x86_64.tar.gz' saved [3

mv: `mariadb-10.0.21-linux-x86_64.tar.gz' and `/usr/local/mariadb-10.0.21-linux-
Stopping mysqld ...
Stopping mysqld:                [ OK ]
Starting mysqld:                [ OK ]
Giving mysqld a few seconds to start up...
Restarting MySQL.
Stopping mysqld:                [ OK ]
Starting mysqld:                [ OK ]
root@aetheryte:/usr/local/directadmin/custombuild#

I thought there were supposed to be a compiling process or something else..

So I did make sure with ./build mariadb, and this is what I got:
Code:
root@aetheryte:/usr/local/directadmin/custombuild# ./build mariadb
mv: `mariadb-10.0.21-linux-x86_64.tar.gz' and `/usr/local/mariadb-10.0.21-linux-
Stopping mysqld ...
Stopping mysqld:                [ OK ]
Starting mysqld:                [ OK ]
Giving mysqld a few seconds to start up...
This installation of MySQL is already upgraded to 10.0.21-MariaDB, use --force i
Restarting MySQL.
Stopping mysqld:                [ OK ]
Starting mysqld:                [ OK ]
root@aetheryte:/usr/local/directadmin/custombuild# ps waxu |grep mysql
root     25388  0.1  0.0   9372  1540 pts/12   S    17:05   0:00 /bin/sh /usr/lo
mysql    25932  6.5  2.7 2803484 278084 pts/12 Sl   17:05   0:00 /usr/local/mysqta/aetheryte.indoforum.net.err --open-files-limit=50000 --pid-file=/usr/local/mysql
root     26172  0.0  0.0   7840   884 pts/12   R+   17:05   0:00 grep mysql
root@aetheryte:/usr/local/directadmin/custombuild#
 
Just a note that I just upgraded on FreeBSD 9x from MySQL 5.6 to MariaDB 10 without any problems.

I did however stop MySQL first in DA control panel to ensure it wasn't running when I began the "./build mariadb" command. I have a 40GB database and it takes 30+ seconds to shutdown the process.

I just altered the options.conf as instructed above and ran the build command. Done.

Thanks for thread and adding support in CB for MariaDB.

Oh btw I wanted to add that performance greatly improved immediately. There is about 10% more RAM usage but a 70%+ drop in CPU usage. Pretty impressive and well worth it in case anyone else is considering. I run a massive forum using very large db tables in InnoDB.
 
Upgraded from MySQL 5.6 to MariaDB 10.0 without problems. Used the CB plugin:

Go to Custombuild
Select Edit options
Scroll to MySQL Settings
Choose the MariaDB version
Select MariaDB in mysql_inst
Save

Go to Update Software
Look for the update from MySQL to MariaDB
Choose Update
 
Back
Top