{"id":702,"date":"2014-12-29T02:34:19","date_gmt":"2014-12-29T01:34:19","guid":{"rendered":"http:\/\/it.tuxie.eu\/?p=702"},"modified":"2015-01-27T15:49:16","modified_gmt":"2015-01-27T14:49:16","slug":"tokudb-7-5-3-mysql-5-5-40-on-oracle-linux-6-6","status":"publish","type":"post","link":"http:\/\/it.tuxie.eu\/?p=702","title":{"rendered":"TokuDB 7.5.3 (MySQL 5.5.40) on Oracle Linux 6.6"},"content":{"rendered":"<p>Fascinated by fractal trees? Astonished by TokuDB storage engine? Watching new trends where MySQL\/MariaDB serves as baseline and competitive advantages are based on storage engines? Welcome! \ud83d\ude42<\/p>\n<p><!--more--><\/p>\n<p>0) Use (or prepare virtual machine) with Linux OS, 64-bit. There are no other architectures available at this moment + not planned anyway, as far as I know. Anyway it\u2019s pretty common environment. I love Oracle Linux for its performance and very nice database-usage-tuned-operating-system.<\/p>\n<p>1) Download .tar.gz from http:\/\/www.tokutek.com\/tokudb-for-mysql\/ website. It is well known non-binary installation package of mysql with all tokudb features inside. For next few http:\/\/it.tuxie.eu\/wp-admin\/post.php?post=702&amp;action=edit&amp;message=10steps I\u2019m using official install guide with my notices and adjustements, indeed \ud83d\ude42<\/p>\n<p>2) Create mysql user within mysql group:<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 j]# groupadd -g 927 mysql<br \/>\n[root@ol66 j]# useradd -r -u 927 -g mysql mysql<br \/>\n[\/crayon]<\/p>\n<p>3) Make home directory for TokuDB and extract downloaded .tar.gz inside it:<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 j]# mkdir -pv \/opt\/tokutek<br \/>\nmkdir: created directory \/opt\/tokutek&#8216;<br \/>\n[root@ol66 j]# cd \/opt\/tokutek<br \/>\n[root@ol66 tokutek]# tar xzf \/home\/j\/Downloads\/mysql-5.5.40-tokudb-7.5.3-linux-x86_64.tar.gz<br \/>\n[root@ol66 tokutek]# ll<br \/>\ntotal 4<br \/>\ndrwxr-xr-x. 13 root root 4096 Dec 29 01:39 mysql-5.5.40-tokudb-7.5.3-linux-x86_64<br \/>\n[root@ol66 tokutek]#<br \/>\n[\/crayon]<\/p>\n<p>4) Create symbolic link for better handling with server + change permissions (recursively):<\/p>\n<p>[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 tokutek]# ln -sv mysql-5.5.40-tokudb-7.5.3-linux-x86_64 mysql<br \/>\nmysql &#8218;mysql-5.5.40-tokudb-7.5.3-linux-x86_64&#8242;<br \/>\n[root@ol66 tokutek]#<br \/>\n[root@ol66 tokutek]# cd mysql<br \/>\n[root@ol66 mysql]# chown -Rv mysql:mysql *<br \/>\n[\/crayon]<\/p>\n<p>5) Create\/adjust my.cnf, the heart of every mysql server. You can find something like a templates in support-files directory.<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 mysql]# cp -v support-files\/my-small.cnf \/etc\/my.cnf<br \/>\ncp: overwrite \/etc\/my.cnf\u2019? yes<br \/>\nsupport-files\/my-small.cnf&#8216; -&gt; \/etc\/my.cnf\u2019<br \/>\n[root@ol66 mysql]# vi \/etc\/my.cnf<br \/>\n[\/crayon]<\/p>\n<p>and now you will define 2 important directories \u2013 where server resides + where data are stored = add\/adjust these lines inside \/etc\/my.cnf :<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\ndatadir = \/var\/lib\/mysql<br \/>\nbasedir = \/opt\/tokutek\/mysql<br \/>\nuser = mysql<br \/>\n[\/crayon]<\/p>\n<p>6) Double-check both directories owners! All should be set to mysql:mysql. Indeed, if you love adrenaline, mysterious errors and failed start server\u2026. ignore it \ud83d\ude42<\/p>\n<p>e.g. for datadir:<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 mysql]# chown -Rv mysql:mysql *<br \/>\n[\/crayon]<\/p>\n<p>7) Setup system tables as mysql user:<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 mysql]# scripts\/mysql_install_db \u2013user=mysql<br \/>\n\u2026<\/p>\n<p>[root@ol66 mysql]#<br \/>\n[\/crayon]<\/p>\n<p>7) \u201cCreate\u201d service and start mysql server<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 support-files]# ln -sv \/opt\/tokutek\/mysql\/support-files\/mysql.server \/etc\/init.d\/mysql<br \/>\n\/etc\/init.d\/mysql&#8216; -&gt; \/opt\/tokutek\/mysql\/support-files\/mysql.server\u2019<br \/>\n[root@ol66 mysql]# service mysql start<br \/>\nStarting MySQL.. [ OK ]<br \/>\n[root@ol66 mysql]#<br \/>\n[\/crayon]<\/p>\n<p>8) Checking if mysql is really running and\u2026 what is this all about\u2026 tokudb is present! \ud83d\ude42<br \/>\n[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 mysql]# ps -ef | grep mysql<br \/>\nroot 10355 1 0 01:58 pts\/0 00:00:00 \/bin\/sh \/opt\/tokutek\/mysql\/bin\/mysqld_safe \u2013datadir=\/var\/lib\/mysql \u2013pid-file=\/var\/lib\/mysql\/ol66.pid<br \/>\nmysql 10632 10355 0 01:58 pts\/0 00:00:04 \/opt\/tokutek\/mysql\/bin\/mysqld \u2013basedir=\/opt\/tokutek\/mysql \u2013datadir=\/var\/lib\/mysql \u2013plugin-dir=\/opt\/tokutek\/mysql\/lib\/plugin \u2013user=mysql \u2013log-error=\/var\/lib\/mysql\/ol66.err \u2013pid-file=\/var\/lib\/mysql\/ol66.pid \u2013socket=\/tmp\/mysql.sock \u2013port=3306<br \/>\nroot 11099 6355 0 02:27 pts\/0 00:00:00 grep mysql<br \/>\n[root@ol66 mysql]#<br \/>\n[\/crayon]<br \/>\nAnd we can directly check in mysql if plugins are ready. Important notice \u2013 I didn\u2019t run mysql_secure_installation utility = there\u2019s no password for mysql root user, beware \ud83d\ude42<\/p>\n<p>[crayon lang=&#8220;shell&#8220;]<br \/>\n[root@ol66 mysql]# mysql<br \/>\nWelcome to the MySQL monitor. Commands end with ; or \\g.<br \/>\nYour MySQL connection id is 1<br \/>\nServer version: 5.5.40-tokudb-7.5.3 MySQL Community Server (GPL)<\/p>\n<p>Copyright (c) 2000, 2013, Oracle and\/or its affiliates. All rights reserved.<\/p>\n<p>Oracle is a registered trademark of Oracle Corporation and\/or its<br \/>\naffiliates. Other names may be trademarks of their respective<br \/>\nowners.<\/p>\n<p>Type \u2018help;\u2019 or \u2018\\h\u2019 for help. Type \u2018\\c\u2019 to clear the current input statement.<\/p>\n<p>mysql> show plugins;<br \/>\n+\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-+\u2014\u2014\u2014-+\u2014\u2014\u2014\u2014\u2014\u2014\u2013+\u2014\u2014\u2014\u2014\u2013+\u2014\u2014\u2014+<br \/>\n| Name | Status | Type | Library | License |<br \/>\n+\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-+\u2014\u2014\u2014-+\u2014\u2014\u2014\u2014\u2014\u2014\u2013+\u2014\u2014\u2014\u2014\u2013+\u2014\u2014\u2014+<br \/>\n| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |<br \/>\n| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL |<br \/>\n| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| FEDERATED | DISABLED | STORAGE ENGINE | NULL | GPL |<br \/>\n| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |<br \/>\n| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |<br \/>\n| TokuDB | ACTIVE | STORAGE ENGINE | ha_tokudb.so | GPL |<br \/>\n| TokuDB_trx | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |<br \/>\n| TokuDB_locks | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |<br \/>\n| TokuDB_lock_waits | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |<br \/>\n| TokuDB_file_map | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |<br \/>\n| TokuDB_fractal_tree_info | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |<br \/>\n| TokuDB_fractal_tree_block_map | ACTIVE | INFORMATION SCHEMA | ha_tokudb.so | GPL |<br \/>\n+\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-+\u2014\u2014\u2014-+\u2014\u2014\u2014\u2014\u2014\u2014\u2013+\u2014\u2014\u2014\u2014\u2013+\u2014\u2014\u2014+<br \/>\n30 rows in set (0.00 sec)<\/p>\n<p>mysql><br \/>\n[\/crayon]<\/p>\n<p>All done! \ud83d\ude42<\/p>\n<p>-a-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fascinated by fractal trees? Astonished by TokuDB storage engine? Watching new trends where MySQL\/MariaDB serves as baseline and competitive advantages are based on storage engines? Welcome! \ud83d\ude42<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=\/wp\/v2\/posts\/702"}],"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=702"}],"version-history":[{"count":0,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=\/wp\/v2\/posts\/702\/revisions"}],"wp:attachment":[{"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=702"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/it.tuxie.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}