# Mysql 57 EOL :: MariaDb as an alternative?



## Ome Ko (Nov 24, 2019)

Ten days ago Oracle posted a message on its website that declared Mysql 57 for the freebsd-platform officially dead. Users are encouraged to upgrade to Mysql 8. That's sort of sad because the whole 5 branch never ever let me down in over 15 years. 
Now I've been reading about the licensepolicies and the enforcing of them by Oracle and that didn't strike me as a modus operandi I'm particularly in favor of. So while I was upgrading my testserver from 56 to 8 yesterday I decided to check out MariaDb and it sounds a lot nicer (and more familiar) to me. 
Problem is I could not find any documentation concerning the migration from Mysql 8 to a recent version of MariaDb. 
Has anybody tried it and is it possible at all? Otherwise I just relapse to 57 and take it from there.

Any suggestions welcome.


----------



## putney (Nov 24, 2019)

re MySQL 5.7 -> MariaDB10.4, I got held up by an explicit dependency of opendmarc on MySQL (pkg install of opendmarc).

I didn't find any other similar dependencies using 'pkg info -r p5-DBD-mysql', but I imagine it's worth taking a cautious approach to 'mariadb is a drop-in replacement for mysql'.


----------



## CyberCr33p (Nov 24, 2019)

Check comment 5:






						241920 – databases/mysql57-server: Update to 5.7.28
					






					bugs.freebsd.org


----------



## Ome Ko (Nov 30, 2019)

Installing unsupported or EOL versions of mysql on FreeBSD from the updated oracle source  [i.e. mysql 5.x] requires some adjustments if you want the sbin/daemon to manage mysqld as a service. Regular installation hints are at dev.mysql.
For future reference:
1) you need cmake -DWITH_SYSTEMD=1 [otherwise mysqld is not installed]
2) ln -s /usr/build/mysql/mysql-5.x /usr/local/mysql
3) You need to create (or edit an existing rc.d/mysql-server from the ports) with mysqld_safe at /usr/local/mysql/bin/mysqld_safe and procname mysqld at /usr/local/mysql/bin/mysqld to start mysqld at boot.

example:

```
#!/bin/sh # use -x for debugging
#
# PROVIDE: mysql
# REQUIRE: DAEMON
# KEYWORD: shutdown

. /etc/rc.subr

name=mysqld
rcvar=mysql_enable
load_rc_config $name
mysql_user="mysql"
: ${hostname:=`/bin/hostname`}
pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"}
command="/usr/sbin/daemon"
command_args="-c -f /usr/local/mysql/bin/mysqld_safe --basedir=/usr/local/mysql --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}  "
procname="/usr/local/mysql/bin/mysqld"
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
# SET THEM IN THE /etc/rc.conf FILE
#
mysql_enable=${mysql_enable-"NO"}
run_rc_command "$1"
```


----------



## Datapanic (Nov 30, 2019)

I've been running databases/percona57-server for a while now and really like it.  It's not the default version for mysql, so I build my own ports via ports-mgmt/poudriere.  Percona seems to outperform mysql and I hope it stays in the ports tree.  
Percona 5.7 has an EOL of 01-Oct-2023.


----------



## Ome Ko (Nov 30, 2019)

The problem with the mysql and mysql-like DB's seems to be that the security issues as reported about a month ago on https://vuxml.freebsd.org/freebsd/fc91f2ef-fd7b-11e9-a1c7-b499baebfeaf.html are not, or not as swiftly as other ports, patched into the ports/databases.
On the Oracle site the actual version for 5.6 is currently 5.6.46, which is a step ahead of my portsversion of mysql56.
5.6 is ofcourse EOL, but current 8.0 is still at 8.0.17 in the ports, so after upgrading the testserver to 8 the daily warnings kept coming in.

I can't really tell about percona since it says percona-server-5.7.26-29 in the distinfo. The last update was 2 months ago so I don't suppose it's vuxml-proof yet. But I'm going to look into it - the problem is patchspeed, not queryspeed at the moment.

UPDATE: Just noticed MariaDb 55 and 104 were upgraded two days ago, so I think we have a winner.


----------



## proton1234 (Dec 2, 2019)

why not the mysql80?


----------

