mariadb SQL-server plus PHPmyadmin management
Find a file
2021-11-13 19:30:11 +01:00
overlay/usr/local Update my.cnf.template 2021-11-13 18:31:50 +01:00
.gitignore Initial commit 2020-02-05 13:20:03 +01:00
LICENSE Initial commit 2020-02-05 13:20:03 +01:00
post_install.sh Update post_install.sh 2021-11-13 18:33:56 +01:00
README.md Update README.md 2021-11-13 19:23:19 +01:00
settings.json Update settings.json 2021-11-07 19:22:30 +01:00
ui.json Update ui.json 2021-11-13 19:24:32 +01:00

iocage-plugin-mariadb

This service provides a mysql server and nothing more!

create the plugin

iocage fetch --plugin-name "mariadb" --git_repository https://github.com/m1ch/iocage-plugin-index --branch mariadb --name mariadb vnet=On dhcp=Off nat=On

Clean-up after testing

iocage destroy --recursive mariadb

Use the server from the host

Login to a MySQL-root shell from the host

iocage exec mariadb bash -c 'PASS=$(</root/mysqlrootpassword); mysql -u root -p"${PASS}"'

Execude SQL from the host shell

iocage exec mariadb bash -c 'PASS=$(</root/mysqlrootpassword); mysql -u root -p"${PASS}" -e "SHOW DATABASES"'

or

iocage exec mariadb bash -c 'PASS=$(\</root/mysqlrootpassword); mysql -u root -p"${PASS}"' << EOF
SHOW DATABASES;
USE MYSQL;
SHOW TABLES;
EOF

Connect the server to an other jail

set jail_name=mariadb
set socket=`zfs list -o mountpoint | grep "iocage/.*${jail_name}/root" | head -n 1`/var/run/mysql

iocage exec second_jail mkdir /var/run/mysql
iocage fstab -a second_jail $socket /var/run/mysql nullfs ro 0 0