In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Check the output of SHOW ENGINES; or SHOW VARIABLES LIKE 'have%'; to see if previous versions of mysql support this engine.
Mysql > show engines +- -+ | Engine | Support | Comment | Transactions | XA | Savepoints | +- -- + | InnoDB | DEFAULT | Supports transactions Row-level locking, and foreign keys | YES | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | | MEMORY | YES | Hash based, stored in memory Useful for temporary tables | NO | | BLACKHOLE | YES | / dev/null storage engine (anything you write to it disappears) | NO | | MyISAM | YES | MyISAM storage engine | NO | | CSV | | YES | CSV storage engine | NO | | ARCHIVE | YES | Archive storage engine | NO | | PERFORMANCE_SCHEMA | YES | Performance Schema | | | NO | | FEDERATED | NO | Federated MySQL storage engine | NULL | +-| -+ 9 rows in set (0.00 sec)
How to use it?
When you create a table, specify the engine. (select * from emp; does not have any data when viewing)
Mysql > create database test;Query OK, 1 row affected (0.00 sec) mysql > use test;Database changedmysql > create table emp (empno numeric (4) not null,ename varchar (10), job varchar (9), mgr numeric (4), hiredate datetime,sal numeric (7,2), comm numeric (7,2), deptno numeric (2) ENGINE = BLACKHOLE;Query OK, 0 rows affected (0.01sec) mysql > insert into emp values (7369, 'SMITH',' CLERK', 7902, '1980-12-17, 800,null, 20) Query OK, 1 row affected (0.00 sec) mysql > select * from emp;Empty set (0.00 sec)
When you create an BLACKHOLE table, the server creates a table definition file in the database directory. The file begins with the name of the table and has a .frm extension. There are no other files associated with this table.
[root@jz_130] # cd / var/lib/mysql/test/ [root @ jz_130 test] # lltotal 16MurrwMurr. 1 mysql mysql 65 Dec 3 23:18 db.opt-rw-r-. 1 mysql mysql 8780 Dec 3 23:19 emp.frm
You can see from the above example that the table using the BLACKHOLE storage engine does not store any data, but if mysql has binary logging enabled, the SQL statement is written to the log (and copied to the slave server).
When master-slave synchronization, it acts as PROXY between MASTER and SLAVE to relieve the pressure of MASTER and reduce network bandwidth.
Acts as a relief machine between the ordinary MASTER and SLAVE, which is used to cushion the pressure on the MASTER machine and connect the SLAVE to the mitigation machine, thus reducing the network transmission between MASTER and SLAVE. So as to reduce the bandwidth of the network and the pressure on the host.
All processing is done by an intermediate agent machine.
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.