It is important that you use ext-root, before you install, since MariaDB is space hungry. If you want to move the defaults, it requires you to program with it. The info is at the bottom. The defaults are the Linux defaults /var/lib/mysql.

You can read about ext-root at:

The feed

Tested on Linksys WRT


src/gz reboot_mariadb http://cdn.corifeus.com/lede/17.01.4/packages/arm_cortex-a9_vfpv3/mariadb


src/gz reboot_mariadb http://cdn.corifeus.com/lede/17.01.4/packages/mipsel_24kc/mariadb



src/gz reboot_mariadb http://cdn.corifeus.com/lede/17.01.4/packages/arm_cortex-a53_neon-vfpv4/mariadb

Built packages

The router service

Please, where you can find it in LEDE-INSOMNIA, of course it includes init.d service as well.

This is if you have ext-root or enough NAND. :)

# it is important that you might have a conflict if you use 
# some client like php, python or any other mysql client
# libmysqlclient or libmysqlclient-r , so
opkg remove libmysqlclient libmysqlclient-r
opkg update
opkg install mariadb-server libmariadb mariadb-client-extra 
mysql_install_db --force --basedir=/usr
/etc/init.d/mariadb stop|start

Your own build

cp feeds.conf.default feeds.conf
echo 'src-git mariadb https://github.com/patrikx3/lede-mariadb.git' >> feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds update mariadb
./scripts/feeds install -a -p  mariadb

# create a .config
# the default is LITE
make menuconfig

# might need as well
make kernel_menuconfig

# either
make package/feeds/mariadb/mariadb/{clean,prepare,compile} package/index V=s

# or
make V=s

Bulding info

This is based on: https://github.com/openwrt/packages/pull/4221 .

It will be in all of my LEDE-INSOMNIA.

CPU type

Right now, I only test on ARM (Linksys WRT1200ACS, Linksys 3200ACM) and D-Link DIR 860l B1 RAMIPS since it is 5.5.

Change the data location

The defaults are /opt/var/lib/mysql and /opt/var/lib/mysql-tmp (auto created), but you can configure at /etc/mysql/my.cnf and /etc/init.d/mariadb. So, if you move the DB location, then you must change /etc/init.d/mariadb as well as my.cnf together, since right now it is a symlink. The built-in is /var/lib/mysql, that, you can't change right now, but LEDE puts it into the ROM, so I created a symlink for /var/lib/mysql to /opt/var/lib/mysql. That's all.

Given that lots of small devices expect /var/lib/mysql in the ROM and you have a different setup, please do not use /var/lib/mysql, otherwise you have to work on it more, but of course if you change the my.cnf and /etc/init.d/mariadb any setup can be configured at will.