Monday, April 11, 2011

just install mysql-5.6.2-labs-innodb-memcached for test

read Oracle Announces First MySQL 5.6 Development Milestone Release and
and saw new features in MySQL 5.6 development milestone release, and interested NoSQL access to InnoDB via the Memcached protocol. I checked http://labs.mysql.com

First Idea... just tested to install innodb_memcached, so downloaded "mysql-5.6.2-labs-innodb-memcached.tar.gz"
*** Install prerequisite - libevent - it should be libevent 1.4.3
# ls mysql-5.6.2-labs-innodb-memcached.tar.gz
mysql-5.6.2-labs-innodb-memcached.tar.gz

# tar zxvf mysql-5.6.2-labs-innodb-memcached.tar.gz

# cd mysql-5.6.2-labs-innodb-memcached/plugin/innodb_memcached/libevent
# sh autogen.sh
# ./configure
# make
# make install
then to SRC PATH and installed
# mkdir build
# cd build
# cmake ../mysql-5.6.2-labs-innodb-memcached
# make
# make install
# cd /usr/local/mysql
# chown -R mysql .
# chgrp -R mysql .
# scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data
# cp support-files/my-small.cnf /etc/my.cnf
# bin/mysqld_safe --user=mysql &
checked version and plugins
mysql> select version();
+-----------------------------+
| version() |
+-----------------------------+
| 5.6.2-labs-innodb-memcached |
+-----------------------------+

mysql> show plugins;
+--------------------------+--------+--------------------+---------+---------+
| Name | Status | Type | Library | License |
+--------------------------+--------+--------------------+---------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FIELDS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
+--------------------------+--------+--------------------+---------+---------+
then read "README-innodb_memcached" file.
# less README-innodb_memcached
had to create database "innodb_memcache" and install plugin
# ./bin/mysql < scripts/innodb_memcached_config.sql

mysql> INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so';

mysql> show plugins;
+--------------------------+--------+--------------------+-----------------+---------+
| Name | Status | Type | Library | License |
+--------------------------+--------+--------------------+-----------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FIELDS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| daemon_memcached | ACTIVE | DAEMON | libmemcached.so | GPL |
+--------------------------+--------+--------------------+-----------------+---------+
tested it out..
# telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
set a11 0 0 9
123456789
STORED

ERROR
get a11
VALUE a11 0 9
123456789
END
However.... I stopped mysql server and started again
# ./bin/mysqladmin shutdown

# ./bin/mysqld_safe --user=mysql &
110412 01:03:00 mysqld_safe Logging to '/usr/local/mysql/data/linuxtest01.err'.
110412 01:03:00 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
110412 01:03:02 mysqld_safe mysqld from pid file /usr/local/mysql/data/linuxtest01.pid ended
In /usr/local/mysql/data/linuxtest01.err file:
110412 1:03:01 InnoDB: Waiting for the background threads to start
110412 1:03:02 InnoDB: 1.2.2 started; log sequence number 1616143
Failed to open library "/usr/local/mysql/lib/plugin/innodb_engine.so<99>": /usr/local/mysql/lib/plugin/innodb_engine.so
<99>: cannot open shared object file: No such file or directory

this ""/usr/local/mysql/lib/plugin/innodb_engine.so<99>" is mistaken, after installed "daemon_memcached" plugin.
OK... it's just testing.

By the way, If you need to test... and read more... check at Get started with InnoDB Memcached Daemon plugin

No comments: