日期:2014-05-16 浏览次数:20970 次
shell> groupadd mysql shell> useradd -r -g mysql mysql shell> cd /usr/local/mysql shell> chown -R mysql . shell> chgrp -R mysql . shell> scripts/mysql_install_db --user=mysql shell> chown -R root . shell> chown -R mysql data shell> cp support-files/mysql.server /etc/init.d/mysql
mysql < scripts/innodb_memcached_config.sql
mysql> install plugin daemon_memcached soname "libmemcached.so";
telnet localhost 11211 set test 0 0 2 11 STORED get test VALUE test 0 2 11 END
mysql> use innodb_memcache; Database changed mysql> show tables; +---------------------------+ | Tables_in_innodb_memcache | +---------------------------+ | cache_policies | | config_options | | containers | +---------------------------+ 3 rows in set (0.00 sec)
mysql> select * from containers; +------+-----------+-----------+-------------+---------------+-------+------------+--------------------+------------------------+ | name | db_schema | db_table | key_columns | value_columns | flags | cas_column | expire_time_column | unique_idx_name_on_key | +------+-----------+-----------+-------------+---------------+-------+------------+--------------------+------------------------+ | aaa | test | demo_test | c1 | c2 | c3 | c4 | c5 | idx | +------+-----------+-----------+-------------+---------------+-------+------------+--------------------+------------------------+ 1 row in set (0.00 sec)
mysql> use test; Database changed mysql> select * from demo_test; +------+------+------+------+--------------+------+------+------+------+------+------+ | cx | cy | c1 | cz | c2 | ca | CB | c3 | cu | c4 | C5 | +------+------+------+------+--------------+------+------+------+------+------+------+ | 9 | 3 | AA | 2 | HELLO, HELLO | 8 | 8 | 0 | 1 | 3 | 0 | +------+------+------+------+--------------+------+------+------+------+------+------+ 1 row in set (0.00 sec)
sql> SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
CREATE TABLE `cache_policies` ( `policy_name` varchar(40) NOT NULL, `get_policy` enum('innodb_only','cache_only','caching','disabled') NOT NULL, `set_policy` enum('