Skip to content
Matt Simerson edited this page May 25, 2023 · 17 revisions

create jail 'mysql'

. mail-toaster.sh && provision mysql

Sample output

MySQL Data filesystem

Notice that mysql has a separate data volume. When a new MySQL jail gets provisioned, the data volume persists.

# zfs list | grep mysql
zroot/data/mysql                111M  14.1G   111M  /data/mysql
zroot/jails/mysql               196M  14.1G   653M  /jails/mysql

decide for MariaDB

If you want a high performance replacement for MySQL, you can also install MariaDB. Google to see the differences. Set the export TOASTER_MARIADB to 1 and MariaDB will be installed instead of MySQL.

Mail-Toaster components that can use MySQL

Component Used for Justification
Vpopmail User Database
SpamAssassin per-user prefs Allows users to edit SA prefs from webmail
Rainloop Address book Can use Sqlite instead
Roundcube User prefs & Address book Can use Sqlite instead
Squirrelmail User prefs & Address book Can use files instead

Tuning MySQL

If you use MySQL heavily (say, user DB for thousands of users, or with dspam, then be sure to tune MySQL for higher performance as it can make a profound difference. Install mytop and mysqltuner and get familiar with them.

pkg install -y mytop mysqltuner

Clone this wiki locally