+----+------------------+------+------+------+ | c1 | c2 | c3 | c4 | c5 | +----+------------------+------+------+------+ | AA | HELLO, HELLO | 8 | 0 | 0 | +----+------------------+------+------+------+ 

For more information about innodb_memcache  tables and the demo_test  sample table, see Section 15.20.8, “InnoDB memcached Plugin Internals” . 

2. Activate the daemon_memcached  plugin by running the INSTALL PLUGIN  statement: 

mysql> INSTALL PLUGIN daemon_memcached soname "libmemcached.so"; 

Once the plugin is installed, it is automatically activated each time the MySQL server is restarted. 

## Verifying the InnoDB and memcached Setup 

To verify the daemon_memcached  plugin setup, use a telnet  session to issue memcached  commands. By default, the memcached  daemon listens on port 11211. 

1. Retrieve data from the test.demo_test  table. The single row of data in the demo_test  table has a key value of AA . 

telnet localhost 11211 Trying 127.0.0.1... Connected to localhost. Escape character is ’^]’. get AA VALUE AA 8 12 HELLO, HELLO END 

2. Insert data using a set  command. 

set BB 10 0 16 GOODBYE, GOODBYE STORED 

where: 

• set  is the command to store a value 

• BB  is the key 

• 10  is a flag for the operation; ignored by memcached  but may be used by the client to indicate any type of information; specify 0  if unused 

• 0  is the expiration time (TTL); specify 0  if unused 

• 16  is the length of the supplied value block in bytes 

• GOODBYE, GOODBYE  is the value that is stored 

3. Verify that the data inserted is stored in MySQL by connecting to the MySQL server and querying the test.demo_test  table. 

mysql> SELECT * FROM test.demo_test; +----+------------------+------+------+------+ | c1 | c2 | c3 | c4 | c5 | +----+------------------+------+------+------+ | AA | HELLO, HELLO | 8 | 0 | 0 | | BB | GOODBYE, GOODBYE | 10 | 1 | 0 | 

