首页 > 其他分享 > percona-server-rocksdb-8.0.32 安装

percona-server-rocksdb-8.0.32 安装

时间:2023-05-12 14:02:27浏览次数:47  
标签:8.0 NO 32 rocksdb server percona root

MyRocks是关系型数据库Mysql 基于RocksDB 的存储引擎,一个可嵌入的、持久的键值存储。Percona MyRocks 是集于 Percona Server for MySQL的.

RocksDB存储基于日志结构的合并树(LSM tree)。它针对快速存储进行了优化,有出色的空间和写入效率以及可接受的读取性能。因此,如果您的工作负载使用SSD等快速存储,MyRocks与其他存储引擎相比具有以下优势:

需要更少的存储空间

提供更高的存储耐用性

确保更好的IO容量

安装 Percona MyRocks

  1. 下载安装包

    [root@HDDC-DFNV-L3-Nredis03 peona-server-8.0.32-24]# ll
    total 115764
    -rw-r----- 1 root root  2172240 Mar 10 03:55 percona-icu-data-files-8.0.32-24.1.el7.x86_64.rpm
    -rw-r----- 1 root root 16856148 Mar 10 03:55 percona-server-client-8.0.32-24.1.el7.x86_64.rpm
    -rw-r----- 1 root root  1932780 Mar 10 03:55 percona-server-devel-8.0.32-24.1.el7.x86_64.rpm
    -rw-r----- 1 root root 18054024 Mar 10 03:55 percona-server-rocksdb-8.0.32-24.1.el7.x86_64.rpm
    -rw-r----- 1 root root 76730136 Mar 10 03:55 percona-server-server-8.0.32-24.1.el7.x86_64.rpm
    -rw-r----- 1 root root  1560508 Mar 10 03:55 percona-server-shared-8.0.32-24.1.el7.x86_64.rpm
    -rw-r----- 1 root root  1226512 Mar 10 03:55 percona-server-shared-compat-8.0.32-24.1.el7.x86_64.rpm
  2. 安装os系统包
    yum -y install cmake gcc gcc-c++ ncurses ncurses-devel bison readline-devel jemalloc zlib zlib-devel  valgrind valgrind-devel   net-tools

    3. 初始化  Percona Server for MySQL

 
[root@HDDC-DFNV-L3-Nredis03 percona-server-8.0.32-24]# pwd
/root/percona-server-8.0.32/percona-server-8.0.32-24
[root@HDDC-DFNV-L3-Nredis03 percona-server-8.0.32-24]# ll
total 115764
-rw-r----- 1 root root  2172240 Mar 10 03:55 percona-icu-data-files-8.0.32-24.1.el7.x86_64.rpm
-rw-r----- 1 root root 16856148 Mar 10 03:55 percona-server-client-8.0.32-24.1.el7.x86_64.rpm
-rw-r----- 1 root root  1932780 Mar 10 03:55 percona-server-devel-8.0.32-24.1.el7.x86_64.rpm
-rw-r----- 1 root root 18054024 Mar 10 03:55 percona-server-rocksdb-8.0.32-24.1.el7.x86_64.rpm
-rw-r----- 1 root root 76730136 Mar 10 03:55 percona-server-server-8.0.32-24.1.el7.x86_64.rpm
-rw-r----- 1 root root  1560508 Mar 10 03:55 percona-server-shared-8.0.32-24.1.el7.x86_64.rpm
-rw-r----- 1 root root  1226512 Mar 10 03:55 percona-server-shared-compat-8.0.32-24.1.el7.x86_64.rpm
[root@HDDC-DFNV-L3-Nredis03 percona-server-8.0.32-24]# 

[root@HDDC-DFNV-L3-Nredis03 percona-server-8.0.32-24]#  yum localinstall -y *.rpm

Installed:
  percona-icu-data-files.x86_64 0:8.0.32-24.1.el7             percona-server-client.x86_64 0:8.0.32-24.1.el7       percona-server-devel.x86_64 0:8.0.32-24.1.el7       
  percona-server-rocksdb.x86_64 0:8.0.32-24.1.el7             percona-server-server.x86_64 0:8.0.32-24.1.el7       percona-server-shared.x86_64 0:8.0.32-24.1.el7      
  percona-server-shared-compat.x86_64 0:8.0.32-24.1.el7      

Complete!

4.启动mysql 并修改 root 密码

[root@HDDC-DFNV-L3-Nredis03 system]# systemctl start mysqld


mysql日志文件中找到初始的默认密码。接着修改root账户的默认密码:

[root@HDDC-DFNV-L3-Nredis03 system]# cat /var/log/mysqld.log |grep -E "pass"
2023-05-12T02:38:46.620826Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ,DlCHuMer5fT


[root@HDDC-DFNV-L3-Nredis03 system]# mysql -uroot -p',DlCHuMer5fT' -S /var/lib/mysql/mysql.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.32-24

Copyright (c) 2009-2023 Percona LLC and/or its affiliates
Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> SET PASSWORD FOR root@localhost = '123gsDDDug#dd6';
Query OK, 0 rows affected (0.01 sec)

5. enable-rocksdb 引擎

[root@HDDC-DFNV-L3-Nredis03 ~]# ps-admin --enable-rocksdb -u root -p
Enter password:

Checking if RocksDB plugin is available for installation ...
INFO: ha_rocksdb.so library for RocksDB found at /usr/lib64/mysql/plugin/ha_rocksdb.so.

Checking RocksDB engine plugin status...
INFO: RocksDB engine plugin is not installed.

Installing RocksDB engine...
INFO: Successfully installed RocksDB engine plugin.

mysql> show engines;
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                                    | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
| ndbcluster         | NO      | Clustered, fault-tolerant tables                                           | NULL         | NULL | NULL       |
| FEDERATED          | NO      | Federated MySQL storage engine                                             | NULL         | NULL | NULL       |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                                         | NO           | NO   | NO         |
| ROCKSDB            | YES     | RocksDB storage engine                                                     | YES          | YES  | YES        |
| InnoDB             | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                  | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                                      | NO           | NO   | NO         |
| ndbinfo            | NO      | MySQL Cluster system information storage engine                            | NULL         | NULL | NULL       |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                                      | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears)             | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                                         | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine                                                     | NO           | NO   | NO         |
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
12 rows in set (0.02 sec)

6. rocksdb 引擎测试

mysql> create database chongzh;
Query OK, 1 row affected (0.01 sec)
mysql> use chongzh;
Database changed
mysql> create table r1 (id int, foo char(25)) engine=rocksdb;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into r1 (id,foo) values (1,'test'),(2,'wow'),(3,'q');
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0
mysql> select * from r1;
+------+------+
| id   | foo  |
+------+------+
|    1 | test |
|    2 | wow  |
|    3 | q    |
+------+------+
3 rows in set (0.01 sec)

 

与InnoDB相比,MyRocks存储引擎缺少以下功能:

Online DDL is not supported due to the lack of atomic DDL support.

ALTER TABLE .. EXCHANGE PARTITION.

SAVEPOINT

Transportable tablespace

Foreign keys

Spatial indexes

Fulltext indexes

Gap locks

Group Replication

Partial Update of LOB in InnoDB

​与InnoDB相比,MyRocks存储引擎​优势:

1. rocksdb压缩率非常高,大约只有innodb的1/3,同时也要比压缩后的innodb小。
2. rocksdb读性能对比innodb还是差不少,但是跟压缩后的innodb相比,某些场景下,还是有一定优势。
3. 写入性能非常优秀。
4. 非常适合写多读少,并且对容量比较敏感的业务场景。
参考:
  • https://docs.percona.com/percona-server/8.0/myrocks/limitations.html

  • https://www.percona.com/software/mysql-database/percona-server

标签:8.0,NO,32,rocksdb,server,percona,root
From: https://www.cnblogs.com/andy6/p/17393903.html

相关文章

  • 博图SCL+LAD之原创程序。 硬件配置S7-12143个CM1241 RS2321个CB1241 RS
    博图SCL+LAD之原创程序。硬件配置S7-1214?3个CM1241RS232?1个CB1241RS485。以下功能只是一部分,占总程序25%,请注意。以下用SCL功能实现:1:预设五组配方,包含条形码编码、光源亮度、板件厚度等信息,单个配方数量20,总共100个配方(配方数可调整)。2:配方存入、读取扫码器数据、设置光源亮度......
  • 博图485和232通讯 硬件:S7-1214+CM1241 RS232-控制上光源通讯、下
    博图485和232通讯硬件:S7-1214+CM1241RS232-控制上光源通讯、下光源、工控机通讯触摸屏:普罗菲斯2轴脉冲伺服垂直伺服、输送伺服软件以下功能:1:所有功能基于扫码2:设备具有三级权限(操作员、工程师、管理员)3:允许设备操作人员工卡名单(10位)4:开机操作需要扫码人员工......
  • stm32 AES256加密 串口IAP升级 bootloader程序 通过上位机将keil生成的
    stm32AES256加密串口IAP升级bootloader程序通过上位机将keil生成的BIN文件进行AES加密,得到新的加密文件,加密需要自己设置秘钥,加密升级包直接烧录不能运行。通过串口升级上位机将加密包发送到单片机,单片机接收到数据后,会根据你事先设置好的秘钥,对数据进行还原,再写入。解密完成,程......
  • Simulink联合单片机开发代码生成1.支持飞思卡尔16位/32位 2.Simuli
    Simulink联合单片机开发代码生成1.支持飞思卡尔16位/32位2.Simulink模块化编程3.带有Bootloader底层,支持CAN上位机刷写4.matlab/Simulink基础m语言,Sfunction等基础资料5.模块化编程案例ID:35199607337353077......
  • 霍尔自学习 stm32f4平台的有hall方波控制工程, 在这这个基础上增加了
    霍尔自学习stm32f4平台的有hall方波控制工程,在这这个基础上增加了hall自学习流程,增加了上位机通信协议,使得电机相线和hall线可以任意接,都可以一键学习,运行电机。keil工程,带结果校验,带上位机。以上描述的资料。提供源码、上位机、hall自学习方法、有感方波控制的所有问题,包括一些超......
  • uart RS232通信
    波特率指的是异步时钟的频率。sourcecodetopmodule`timescale1ns/1ps////////////////////////////////////////////////////////////////////////////////////Company://Engineer:////CreateDate:2023/04/2815:48:05//DesignName://ModuleName:ua......
  • STM32 BMS电池管理系统 主控STM32F103C8T6,具有以下功能:
    STM32BMS电池管理系统主控STM32F103C8T6,具有以下功能:1.具有单体电压、总体电压检测,过充、过放告警及保护功能。常温下静态电压采样精度可达小于20mV。2.具有充放电电流检测,充放电过流告警及保护功能。上位机可以显示充放电状态。3.具有均衡功能,均衡条件程序默认压差大于50mV......
  • STM32同步Buck降压开关电源变换器开方案 主控STM32F334
    STM32同步Buck降压开关电源变换器开方案主控STM32F334,输入12-32V,输出5-28V,最大电流5.5A,才有恒压限流模式,开关频率200kHz,PID控制与2零3极点控制。输出纹波<200mV,具有过压、过流、短路、输入欠压等保护功能。提供原理图,开发软件,设计文档,详细的计算书,使用说明书,PSIM仿真,bom,代码,代码有......
  • TMS320F28335主控 EtherCAT伺服方案 EtherCAT低压伺服
    TMS320F28335主控EtherCAT伺服方案EtherCAT低压伺服,提供TIDSP和FPGA源码和PDF原理图。ID:52100680262519343......
  • STM32_8(DMA)
    DMADMA(DirectMemoryAccess)直接存储器存取DMA可以提供外设和存储器或者存储器和存储器之间的高速数据传输,无须CPU干预,节省了CPU的资源12个独立可配置的通道:DMA1(7个通道),DMA2(5个通道)每个通道都支持软件触发和特定的硬件触发存储器和存储器之间的数据转运用软件触发,外设到存......