Custombuild to support MariaDB on CentOS 6

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,354
I am soon about to replace a CentOS 6 server with a CentOS 7 server. So then I will run MariaDB with Custombuild.

However I have several servers, they are all used for shared hosting clients. It is very problematic to not offer the same database software for all customers at the same time. The problem then is the server I replace will have MariaDB, but the other serveres will still have MySQL until they are replaced in a couple of years. I need to avoid that and offer the same database software for all customers at the same time.

So please make custombuild 2 support MariaDB on CentOS 6 servers too, so that I can have MariaDB on both CentOS 7 and CentOS 6 servers at the same time and avoid the confusion for my customers.

Edit: Also please make a upgrade path to handle upgrading from existing MySQL on CentOS 6 to MariaDB. Something that include custombuild doing all dumping and importing of existing databases into new MariaDB during upgrade/migrating to MariaDB?

Also, when will MariaDB 10 be available in custombuild?
 
CustomBuild 2.0 is not OS version dependent for MariaDB.
It simply checks which DB is running, and gives you choices based on that.

All you'd need to do is manually swap the rpms... but requires going from MySQL 5.5 to MariaDB 5.5.
From my understanding, MySQL 5.6 isn't compatible for the in-place swap.

eg, this is the quick/short version, but you'd probably want to check things first (see below this):
Code:
cd /usr/local/directadmin/custombuildmkdir -p mysql
cd mysql
#assume you are running CentOS 6 64 bit
wget http://files.directadmin.com/services/all/mariadb/5.5/5.5.41/MariaDB-5.5.41-centos6-x86_64-client.rpm
wget http://files.directadmin.com/services/all/mariadb/5.5/5.5.41/MariaDB-5.5.41-centos6-x86_64-common.rpm
wget http://files.directadmin.com/services/all/mariadb/5.5/5.5.41/MariaDB-5.5.41-centos6-x86_64-compat.rpm
wget http://files.directadmin.com/services/all/mariadb/5.5/5.5.41/MariaDB-5.5.41-centos6-x86_64-devel.rpm
wget http://files.directadmin.com/services/all/mariadb/5.5/5.5.41/MariaDB-5.5.41-centos6-x86_64-server.rpm
wget http://files.directadmin.com/services/all/mariadb/5.5/5.5.41/MariaDB-5.5.41-centos6-x86_64-shared.rpm
cd ..
./build mysql_backup
mv mysql_backups mysql_backups.`date +%F`


#after this point, you can't abort


rpm -e --noscripts `rpm -qa | grep MySQL`
cd mysql
rpm -ivh MariaDB-5.5.41*.rpm


#ensure it's running.


cd ..
./build set mysql 5.5
./build set mysql_inst yes
./build mysql


# confirm mysqld is running.


./build php n

Things to check would be:
Code:
rpm -qa | grep MySQL
to ensure it only shows the 4 MySQL rpms.. else you may be deleting more than you planned on.
Note: Deleting rpms does not delete data, but assumes the next rpm set supports the data. MySQL 5.5 -> MariaDB 5.5 should.

Also, the reason we run "./build mysql" later on, is to ensure that the mysql_update is command is run in case the data/tables need to be updated (for example: MySQL 5.5.9 -> MariaDB 5.5.41).. but I'd recommend you have matching minor MySQL version too, eg: 5.5.41 -> 5.5.41.

This is the related guide for going in the other direction MariaDB -> MySQL:
http://forum.directadmin.com/showthread.php?t=50797&p=261610#post261610

John
 
Thanks for the information. However I am already running MySQL 5.6.x on all my servers (currently all my servers is CentOS 6.x). As said, it is problematic that default on DirectAdmin on CentOS 7 is that MariaDB is installed with custombuild without any options to change to MySQL. I can't use your guide because I am on MySQL 5.6.x. All I need is to be able to run either MySQL or MariaDB on ALL my servers, not MariaDB on CentOS 7 and MySQL on the other servers. I really wish DirectAdmin would implement a migration path and option in custombuild to do this.

I would be happy if I easy could run either MySQL 5.6.x on all servers (both CentOS 6.x and CentOS 7.x) or if I could easy run MariaDB on all servers (both CentOS 6.x and CentOS 7.x). I am not happy that it is problematic to do this, I do not wish to mix both MySQL and MariaDB depending if the server run CentOS 6.x or CentOS 7.x.
 
Back
Top