MariaDB 10 Guide.

All:

I could not find a solid guide on how to upgrade Interworx 5.X Mysql to MariaDB 10.x. So a few caviots MariaDB 10 is not supported currently by Interworx OR Me for that matter. BACKUP YOUR SYSTEM AND DB’S. I warned you. Try this on a test box. Dont have a test box…well buckle your seet belt here we go. I will attach the guide and copy and paste it here. Feel free to improve of change it. Please post improvement and success here…

#Interworx 5.x #Mysql to MariaBD 10.x guide
#CENTOS 7.x
#Brent Dacus 2016

#NOTES Depending on your installed server you may need to substitute maria for mysql or vise versa.

#BACKUP YOUR DB’s NOW…

#Lets do a on the system update. You should be good here but if your Naughty well here we go.

yum update -y

#need to backup config will need later.

mv /etc/my.cnf /etc/my.cnf.bak

#stop server

systemctl stop mysql OR systemctl stop mariadb

yum remove mariadb mariadb-server mariadb-libs mariadb-devel

#It should not tell you it will NOT remove dependancies!!! found it might want to
#remove net-snmp and php-snmp. I let it remove them and then reinstalled.

#Option: You could use:

rpm -e mariadb mariadb-server mariadb-libs mariadb-devel --nodeps

yum clean all

#Add new repo for MariaDB 10. you can get this on the repos generator here.
#Go her in your browser an follow the prompts

#You should get
#start copy paste here

MariaDB 10.0 CentOS repository list - created 2016-08-13 17:06 UTC

Download MariaDB Server - MariaDB.org

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
#End copy paste here.

#from cd /etc/yum.repos.d

nano mariadb10.repo

#Paste in the above repo info and save.

#Dont be tempted to run the Install command on the MariaDB website yet…

#This will update and existing items after adding the new repo.

yum update -y

#Now run. Almost there!!!

yum install MariaDB-client.x86_64 MariaDB-server.x86_64 MariaDB-common.x86_64 MariaDB-devel.x86_64 MariaDB-shared.x86_64

#Under Installed you should see only entries like “10.1.16-1.el7.centos”

yum list maria*

#Now run
systemctl start mariadb

#or

systemctl start mysql

#either should work

#Now we need to upgrade the mysql system db

mysql_upgrade --verbose -uroot -p

#Enter your Mysql root password when asked.

systemctl restart mariadb

systemctl status mariadb

#In “status” Shouldn’t se any errors

#just to be sure we are all enabled

systemctl enable mariadb

#Replace the New my.cnf with the Interworks one. We will backup the new one as well.
#Should be fine but you might want compare them.

mv /etc/my.cnf /etc/my.cnf.mdb10

mv /etc/my.cnf.bak /etc/my.cnf

systemctl restart mariadb

systemctl status mariadb

#WHEW YOU did it!!!

#login to Nodeworx and check Overview and PhpMyAdmin

#In Overview you will see the wrong Version listes as 5.5.5

#In PhpMyAdmin you should the correct Server version.

Interworx MariaDB 10 Upgrade.txt (2.55 KB)

Hi bfacus01

Looks like a lovely how to and if j have time next few weeks, I’ll try it on a test server

The IW cp version maybe detecting IW MySQL perhaps

Hopefully your how too may inspire others to post their how too

Many thanks

John

Hi,

Good tutorial. I will try in the next days when i have the time.

Can i ask you if after the MariaDB 10 update, on NodeWorx you can still manage and change database details and values or when you try, it will show an error or not apply settings?

This is just to know if after MariaDB 10 update, we will have to manage the database using SSH instead of Nodeworx control panel.

Thanks

[QUOTE=nqservices;28918]Hi,

Good tutorial. I will try in the next days when i have the time.

Can i ask you if after the MariaDB 10 update, on NodeWorx you can still manage and change database details and values or when you try, it will show an error or not apply settings?

This is just to know if after MariaDB 10 update, we will have to manage the database using SSH instead of Nodeworx control panel.

Thanks[/QUOTE]

I found a few issues in the tutorial… Havent had time to update yet.

And Yes I can confirm the GUI Mysql Server options doesnt seem to work… Might need to look at that.

[QUOTE=nqservices;28918]Hi,

Good tutorial. I will try in the next days when i have the time.

Can i ask you if after the MariaDB 10 update, on NodeWorx you can still manage and change database details and values or when you try, it will show an error or not apply settings?

This is just to know if after MariaDB 10 update, we will have to manage the database using SSH instead of Nodeworx control panel.

Thanks[/QUOTE]

ok sorted it.

need to backup the exsisting /etc/my.cnf before the upgrade

The file at minimum seems to need.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

Settings user and group are ignored when systemd is used.

If you need to run mysqld under a different user or group,

customize your systemd unit file for mariadb according to the

instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

include all files from the config directory

!includedir /etc/my.cnf.d

The 10.x file is just which appers to not work because IW is expecting the other verbage.

This group is read both both by the client and the server

use it for options that affect everything

[client-server]

include all files from the config directory

!includedir /etc/my.cnf.d

Guide updated…

this will work from going from MySQL 5.5 (MariaDB) to 5.10 no problems right? Just making sure there isn’t anything else I need to be on the lookout for (I know there was old/new password issues before on MySQL upgrades for Interworx).

I was able to follow the guide from a clean install of centos 7 and interworx. So far the only persistent issue is in the GUI its listed a 5.5.5. This is not supported by Interworx or me. I have followed this guide on 2 boxes and all is fine. I actually even went all the way to 10.1.

Hi. Ok, the GUI is not a problem. But in terms of the automatic InterWorx Backups, will IW propely backup the databases after the update to MariaDB 10? Or after the update the backups will have issues?

Also, after the update where is location of the file where i can change mysql settings? I tried to open /etc/my.cnf but the options are not there.

Thanks

Hi,

Does anyone knows the file/location where we can edit and change the MariaDB settings?

Thanks

Hi nqservices

I think it’s \var\mysql or it maybe var\mariadb

It will most likely be the default location

Actually, the location maybe shown in cf

Many thanks

John

Hi @d2d4j,

Thanks for the help. I try to open the 2 locations you said but they don’t exist as you can see bellow:

[root@server ~]# cd /var/mysql/
-bash: cd: /var/mysql/: No such file or directory

[root@server ~]# cd /var/mariadb/
-bash: cd: /var/mariadb/: No such file or directory

>> Then i try to make this:

[root@server ~]# which mysqld
/usr/sbin/mysqld

[root@server ~]# /usr/sbin/mysqld --verbose --help | grep -A 1 “Default options”
2016-09-07 2:40:29 140337878456448 [Note] Plugin ‘FEEDBACK’ is disabled.
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf

>> So then i try to open the /etc/my.cnf file, but the content of this file is just:


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

Settings user and group are ignored when systemd is used.

If you need to run mysqld under a different user or group,

customize your systemd unit file for mariadb according to the

instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

include all files from the config directory

!includedir /etc/my.cnf.d

> So then i have made a search on all server for “*.cnf” files and the result was:

[root@server ~]# find / -type f -name “*.cnf”

/etc/pki/tls/openssl.cnf
/etc/courier/imapd.cnf
/etc/courier/pop3d.cnf
/etc/my.cnf
/etc/my.cnf.d/tokudb.cnf
/etc/my.cnf.d/client.cnf
/etc/my.cnf.d/server.cnf
/etc/my.cnf.d/mysql-clients.cnf
/usr/local/interworx/lib/letsencrypt/examples/openssl.cnf
/usr/local/interworx/mysql/usr/share/percona-server/my-small.cnf
/usr/local/interworx/mysql/usr/share/percona-server/my-large.cnf
/usr/local/interworx/mysql/usr/share/percona-server/my-huge.cnf
/usr/local/interworx/mysql/usr/share/percona-server/my-innodb-heavy-4G.cnf
/usr/local/interworx/mysql/usr/share/percona-server/my-medium.cnf
/usr/local/interworx/mysql/my.cnf
/usr/share/doc/iworx-db-55-5.5.45/my-small.cnf
/usr/share/doc/iworx-db-55-5.5.45/my-large.cnf
/usr/share/doc/iworx-db-55-5.5.45/my-huge.cnf
/usr/share/doc/iworx-db-55-5.5.45/my-innodb-heavy-4G.cnf
/usr/share/doc/iworx-db-55-5.5.45/my-medium.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-large.cnf
/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/wsrep.cnf

I think the MariaDB config file is: /usr/local/interworx/mysql/my.cnf, correct?

If not, what is the correct file?

Thanks

Hi nqservices

Ah, sorry I thought you were asking for the directory

Yes, my.cnf is the config file

Many thanks

John

Coool, i will try… if i have problems i will to ask you… :slight_smile:

Does anyone know why this guide (and others) have you uninstall MariaDB 5.5.x and then install MariaDB 10.0 (or 10.1)?


yum remove mariadb-server mariadb mariadb-libs
yum -y install MariaDB-server MariaDB-client
systemctl start mysql
mysql_upgrade

Why doesn’t this work?


systemctl stop mysql
yum upgrade
systemctl start mysql
mysql_upgrade

This guide basically follows the same stuff as Brent’s and it has the same uninstall / reinstall.

Hi Justin
Many thanks, and I havenot tried Mariadb myself, but guessing removal of old 5.x before installing new 10.x, is most likely because it of conflicts/errors on dependecies, therefore it is easier to remove and install, then go through all depency failures.
I stress this is just my thoughts and may not be correct
Many thanks
John

I was hoping this thread would be more updated by now as to the compatibility with interworx features. I know interworx has it’s own DB for itself, but I’m talking about where interworx interacts with SiteWorx accounts…like backups for example.

I’m thinking I might get a cheap cloud VPS at my datacenter with InterWorx and just test it out for a month before I try to upgrade my live server. The one feature that I do like on the new MySQL5.6 (which is equivalent to the MariaDB 10.0) is Full-Text indexes with an innodb table. That would be immediately helpful in a handful of sites I host right now and more going forward.

But not sure if the trade off is worth it as far as interworx compatibility.

Hi Justin

As far as I know, all features work as expected but the only issue is the version shown for MySQL in the IW-CP

Many thanks

John

So I got word from the interworx team that a bug report has been filed for the version being shown wrong.

Also, I’m getting my test VPS setup today and going to give this a try following the guide in this thread and this one https://www.liquidweb.com/kb/how-to-upgrade-mariadb-5-5-to-mariadb-10-0-on-centos-7/

Hi Justin

Many thanks

I’m sure it will go well for you, as it appears to for others who have posted but appreciate how you got on in an update

Many thanks

John