{"id":308,"date":"2014-02-05T09:25:03","date_gmt":"2014-02-05T09:25:03","guid":{"rendered":"http:\/\/it.tuxie.eu\/?p=308"},"modified":"2014-02-05T09:25:03","modified_gmt":"2014-02-05T09:25:03","slug":"tokudb-installation-debian-7-2-x64","status":"publish","type":"post","link":"http:\/\/it.tuxie.eu\/?p=308","title":{"rendered":"TokuDB installation (Debian 7.2 x64)"},"content":{"rendered":"<p>&#8222;Pure&#8220; MySQL is dead. Thanks to Oracle approach, thanks to very few inventions in last years (=versions). Among MariaDB there are few other players trying to attract customer. <a href=\"http:\/\/www.tokutek.com\/products\/tokudb-for-mysql\/\">TokuDB<\/a> is from my opinion the best choice for mature storage engine.<\/p>\n<p><!--more--><\/p>\n<p>First surprise &#8211; TokuDB is supporting only 64-bit linux at this moment. Nah, no problem \ud83d\ude42<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">j@debian:~\/install$ <span style=\"color: #ff0000;\"><strong>ls -la<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">total 287184<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">drwxr-xr-x\u00a0 2 j j\u00a0\u00a0\u00a0\u00a0\u00a0 4096 Feb\u00a0 4 15:53 .<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">drwxr-xr-x 28 j j\u00a0\u00a0\u00a0\u00a0\u00a0 4096 Feb\u00a0 4 10:17 ..<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">-rwxrwx&#8212;\u00a0 1 j j 294061828 Feb\u00a0 4 15:23 mariadb-5.5.30-tokudb-7.1.0-linux-x86_64.tar.gz<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">j@debian:~\/install$ <\/span><\/p>\n<p>Well, this package is typical .tar &#8222;portable&#8220; solution. No installer, no binary files. I will follow 2 things from now &#8211; all actions will be done as root + i\u00b4m following QuickGuide.pdf (also downloadable from TokuDB site).<\/p>\n<p><strong>Preparation phase<\/strong><\/p>\n<p>Creating new group dedicated to mysql, creating mysql user, creating home directory for TokuDB, extracting files from tar.gz into this directory:<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:~# <span style=\"color: #ff0000;\"><strong>groupadd -g 927 mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:~# <span style=\"color: #ff0000;\"><strong>useradd -r -u 927 -g mysql mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:~# <span style=\"color: #ff0000;\"><strong>mkdir -pv \/opt\/tokutek<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">mkdir: created directory `\/opt\/tokutek&#8216;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:~# <span style=\"color: #ff0000;\"><strong>cd \/opt\/tokutek<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek# <span style=\"color: #ff0000;\"><strong>tar -xzf \/home\/j\/install\/mariadb-5.5.30-tokudb-7.1.0-linux-x86_64.tar.gz <\/strong><\/span><\/span><\/p>\n<p>Linking directory to mysql, changing ownership of all files within this directory:<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek# <span style=\"color: #ff0000;\"><strong>ls<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">mariadb-5.5.30-tokudb-7.1.0-linux-x86_64<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek# <span style=\"color: #ff0000;\"><strong>ln -sv mariadb-5.5.30-tokudb-7.1.0-linux-x86_64 mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">`mysql&#8216; -&gt; `mariadb-5.5.30-tokudb-7.1.0-linux-x86_64&#8242;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek# <span style=\"color: #ff0000;\"><strong>cd mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek\/mysql# <span style=\"color: #ff0000;\"><strong>chown -R mysql:mysql .<\/strong><\/span><\/span><\/p>\n<p>Copying my.cnf into \/etc directory + changes in this file:<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek\/mysql# <span style=\"color: #ff0000;\"><strong>cp -v support-files\/my-small.cnf \/etc\/my.cnf<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">`support-files\/my-small.cnf&#8216; -&gt; `\/etc\/my.cnf&#8216;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek\/mysql# <span style=\"color: #ff0000;\"><strong>nano \/etc\/my.cnf<\/strong><\/span><\/span><\/p>\n<p>Main configuration file is very messed up with comments in default. In production system my.cnf should not consist of any comments or not so long \ud83d\ude42 Followed by guide, i just inputed these new variables into <strong>[mysqld]<\/strong> section:<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">datadir = \/var\/lib\/mysql<\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">basedir = \/opt\/tokutek\/mysql<\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">user = mysql<\/span><\/p>\n<p>Filling system tables in mysql:<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek\/mysql# <span style=\"color: #ff0000;\"><strong>scripts\/mysql_install_db &#8211;user=mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">Installing MariaDB\/MySQL system tables in &#8218;\/var\/lib\/mysql&#8216; &#8230;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">OK<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">Filling help tables&#8230;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">OK<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">&#8230;<\/span><\/p>\n<p>Linking and running mysql service finaly \ud83d\ude42<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek\/mysql\/support-files# <span style=\"color: #ff0000;\"><strong>ln -sv \/opt\/tokutek\/mysql\/support-files\/mysql.server \/etc\/init.d\/mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">`\/etc\/init.d\/mysql&#8216; -&gt; `\/opt\/tokutek\/mysql\/support-files\/mysql.server&#8216;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root@debian:\/opt\/tokutek\/mysql\/support-files# <span style=\"color: #ff0000;\"><strong>service mysql start<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">Starting MySQL<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">[ o. <\/span><\/p>\n<p>Checking that TokuDB is really running:<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">j@debian:~$ <span style=\"color: #ff0000;\"><strong>ps -ef | grep mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">root\u00a0\u00a0\u00a0\u00a0\u00a0 3527\u00a0\u00a0\u00a0\u00a0 1\u00a0 0 09:15 pts\/0\u00a0\u00a0\u00a0 00:00:00 \/bin\/sh \/opt\/tokutek\/mysql\/bin\/mysqld_safe &#8211;datadir=\/var\/lib\/mysql &#8211;pid-file=\/var\/lib\/mysql\/debian.pid<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">mysql\u00a0\u00a0\u00a0\u00a0 3820\u00a0 3527\u00a0 0 09:15 pts\/0\u00a0\u00a0\u00a0 00:00:03 \/opt\/tokutek\/mysql\/bin\/mysqld &#8211;basedir=\/opt\/tokutek\/mysql &#8211;datadir=\/var\/lib\/mysql &#8211;plugin-dir=\/opt\/tokutek\/mysql\/lib\/plugin &#8211;user=mysql &#8211;log-error=\/var\/lib\/mysql\/debian.err &#8211;pid-file=\/var\/lib\/mysql\/debian.pid &#8211;socket=\/tmp\/mysql.sock &#8211;port=3306<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">j\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 4056\u00a0 3458\u00a0 0 10:14 pts\/0\u00a0\u00a0\u00a0 00:00:00 grep mysql<\/span><\/p>\n<p><strong>Verification phase<\/strong><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">j@debian:~$ <span style=\"color: #ff0000;\"><strong>\/opt\/tokutek\/mysql\/bin\/mysql<\/strong><\/span><\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">Welcome to the MariaDB monitor.\u00a0 Commands end with ; or \\g.<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">Your MariaDB connection id is 1<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">Server version: 5.5.30-tokudb-7.1.0-MariaDB MariaDB Server<\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.<\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">Type &#8218;help;&#8216; or &#8218;\\h&#8216; for help. Type &#8218;\\c&#8216; to clear the current input statement.<\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">MariaDB [(none)]&gt; <span style=\"color: #ff0000;\"><strong>show plugins;<\/strong><\/span><\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | ACTIVE\u00a0\u00a0 | STORAGE ENGINE\u00a0\u00a0\u00a0\u00a0 | ha_tokudb.so | GPL\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB_trx\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | ACTIVE\u00a0\u00a0 | INFORMATION SCHEMA | ha_tokudb.so | GPL\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB_locks\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | ACTIVE\u00a0\u00a0 | INFORMATION SCHEMA | ha_tokudb.so | GPL\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB_lock_waits\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | ACTIVE\u00a0\u00a0 | INFORMATION SCHEMA | ha_tokudb.so | GPL\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB_file_map\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | ACTIVE\u00a0\u00a0 | INFORMATION SCHEMA | ha_tokudb.so | GPL\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB_fractal_tree_info\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | ACTIVE\u00a0\u00a0 | INFORMATION SCHEMA | ha_tokudb.so | GPL\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB_fractal_tree_block_map\u00a0 | ACTIVE\u00a0\u00a0 | INFORMATION SCHEMA | ha_tokudb.so | GPL\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">&#8230;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">49 rows in set (0.03 sec)<\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">MariaDB [(none)]&gt; <span style=\"color: #ff0000;\"><strong>show engines;<\/strong><\/span><\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">| TokuDB\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | DEFAULT | Tokutek TokuDB Storage Engine with Fractal Tree(tm) Technology\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | YES\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | YES\u00a0 | YES\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">&#8230;<\/span><br \/>\n<span style=\"font-family: courier new,courier; font-size: 12px;\">11 rows in set (0.00 sec)<\/span><\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">MariaDB [(none)]&gt; <\/span><\/p>\n<p>As usual, storage type must be declared in a time of table creation:<\/p>\n<p><span style=\"font-family: courier new,courier; font-size: 12px;\">create table lala (ID int(11) not null) <strong>engine=TokuDB;<\/strong><\/span><\/p>\n<p>-a-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8222;Pure&#8220; MySQL is dead. Thanks to Oracle approach, thanks to very few inventions in last years (=versions). Among MariaDB there are few other players trying to attract customer. TokuDB is from my opinion the best choice for mature storage engine.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,13],"tags":[],"_links":{"self":[{"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=\/wp\/v2\/posts\/308"}],"collection":[{"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=308"}],"version-history":[{"count":0,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=\/wp\/v2\/posts\/308\/revisions"}],"wp:attachment":[{"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}