In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how mysql5.6.4 supports nosql. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
In the latest mysql-5.6.4-labs-innodb-memcached, the simple nosql function given to key/value is realized, and its main principle
That is, mysqld listens to port 11211 as well as port 3306. Keep mysqld and memcached services in the same process. Pass through
, table-to-field mapping to insert data cached in memcache into the mapped table. Three tables are provided in the installation package: containers
Cache_policies and config_options, table containers provides mapping, and table cache_policies provides three storage methods (
Innodb_only data is inserted into the table only, cache_only only caches data, and caching is cached and inserted into the table), provided in the table config_options
There is a default delimiter "|", that is, if col1,col2... is defined in the values field of the table containers Field, then when you set the cache value
You can use the form val1 | val2, which will insert the val1 into the col1,val2 and into the col2.
Two important files are available in the new version:
1) libmemcached.so: this is the memcached daemon plugin to MySQL
2) innodb_engine.so: this is an InnoDB API plugin to memcached
After installing the plug-in libmemcached.so, memcache can be accessed directly through the API provided by innodb, which is quick and convenient.
Installation mode
For basic installation, please refer to the INSTALL-BINARY file in the installation package, one of which is as follows:
Then you can make a soft link through ln.
Commands:ln-s path (path is the directory of mysql installation packages) / usr/local/mysql
Installation configuration table
There is innodb_memcached_config.sql under the scripts folder of the installation package. Import the file into mysql.
Commands:/usr/local/mysql/bin/mysql-uroot-P 3306-S / tmp/mysql.sock
< path/scripts/innodb_memcached_config.sql 执行完之后再执行:/usr/local/mysql/bin/mysql,将会出现innodb_memcache数据库,默认containers配置是将缓存的数据插入到test 数据库中的demo_test表中,字段c1为缓存key,字段c2为缓存数据...... 安装innodbmemcache插件 可以通过:show variables like '%memcache%'; 查看插件是否安装 连接mysql,安装commands:install plugin daemon_memcached soname "libmemcached.so"; 成功之后将memcache服务安装上 测试 通过telnet 127.0.0.1 11211 连接memcache,简单测试 set a11 10 0 9 123456789 STORED get a11 VALUE a11 0 9 123456789 END 这样就缓存了一条数据,这时候去数据库查看test.demo_test,并不能查到这条数据,这句翻译不好: 1) If you would like to take a look at what’s in the "demo_test" table, please remember we had batched the commits (32 ops by default) by default. So you will need to do "read uncommitted" select to find the just inserted rows: mysql>Set session TRANSACTION ISOLATION LEVEL
-> read uncommitted
Anyway, just execute the above statement, set the read to unrestricted, and then execute: select * from test.demo_test; will find two pieces of data, so congratulations, you have succeeded!
This is the end of this article on "how mysql5.6.4 supports nosql". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.