CentOS - Installatie van TokuDB

TokuDB is een open-source database engine voor MySQL.

Installeren

Download TokuDB voor MySQL.

Uitpakken

tar xvf mysql-5.5.38-tokudb-7.1.7-linux-x86_64.tar

Directory aanmaken

mkdir -pv /opt/tokutek

De opt directory staat voor optioneel maar wordt ook gebruikt om libraries van externe vendors te bewaren.

De directory die eerder is uitgepakt verplaatsen

mv mysql-5.5.38-tokudb-7.1.7-linux-x86_64 /opt/tokutek/mysql

Rechten instellen voor de MySQL gebruiker

chown -R mysql:mysql /opt/tokutek/mysql

Kopieer de standaard MySQL configuratie

cp -v /opt/tokutek/mysql/support-files/my-small.cnf /etc/my.cnf

Wijzig de MySQL configuratie

nano /etc/my.cnf
[mysqld] 
datadir = /var/lib/mysql
basedir = /opt/tokutek/mysql
user = mysql

Installatie script uitvoeren

./opt/tokutek/mysql/scripts/mysql_install_db --datadir=/var/lib/mysql --basedir=/opt/tokutek/mysql --user=mysql

Starten van de mysql deamon

/opt/tokutek/mysql/bin/mysqld_safe &

De MySQL veilig installatie voltooien

/opt/tokutek/mysql/bin/mysql_secure_installation

Het MySQL root wachtwoord wijzigen

/opt/tokutek/mysql/bin/mysqladmin -u root password new-password
/opt/tokutek/mysql/bin/mysqladmin -u root -h server.domain.tld password new-password

Om mysql automatisch te starten na het opstarten van de server:

ln -sv /opt/tokutek/mysql/support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysql

Controleer deze wijziging

chkconfig --list mysql

Symbolic link toevoegen voor de mysql opdracht

ln -s /opt/tokutek/mysql/bin/mysql /usr/local/bin/mysql

Rechten instellen voor de MySQL gebruiker

chown -R mysql:mysql /var/lib/mysql

Controleren

mysql -u root -p
SHOW PLUGINS;
Name Status Type Library License
TokuDB ACTIVE STORAGE ENGINE ha_tokudb.so GPL
TokuDB_trx ACTIVE INFORMATION SCHEMA ha_tokudb.so GPL
TokuDB_locks ACTIVE INFORMATION ha_tokudb.so GPL
TokuDB_lock_waits ACTIVE INFORMATION SCHEMA ha_tokudb.so GPL
TokuDB_file_map ACTIVE INFORMATION SCHEMA ha_tokudb.so GPL
TokuDB_fractal_tree_block_map ACTIVE INFORMATION SCHEMA ha_tokudb.so GPL
SHOW ENGINES;
Engine Support Comment Transactions XA Savepoints
TokuDB DEFAULT Tokutek TokuDB Storage Engine with Fractal Tree(tm) Technology YES YES YES