percona-server-rocksdb-8.0.32 安裝
MyRocks是關係型資料庫Mysql 基於RocksDB 的儲存引擎,一個可嵌入的、持久的鍵值儲存。Percona MyRocks 是集於 Percona Server for MySQL的.
RocksDB儲存基於日誌結構的合併樹(LSM tree)。它針對快速儲存進行了最佳化,有出色的空間和寫入效率以及可接受的讀取效能。因此,如果您的工作負載使用SSD等快速儲存,MyRocks與其他儲存引擎相比具有以下優勢:
需要更少的儲存空間
提供更高的儲存耐用性
確保更好的IO容量
安裝 Percona MyRocks
-
下載安裝包
[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
-
安裝os系統包
yum -y install cmake gcc gcc-c++ ncurses ncurses-devel bison readline-devel jemalloc zlib zlib-devel valgrind valgrind-devel net-tools
-
初始化 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;
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儲存引擎 缺少以下功能:
is not supported due to the lack of atomic DDL support.
.
1. rocksdb壓縮率非常高,大約只有innodb的1/3,同時也要比壓縮後的innodb小。 2. rocksdb讀效能對比innodb還是差不少,但是跟壓縮後的innodb相比,某些場景下,還是有一定優勢。 3. 寫入效能非常優秀。 4. 非常適合寫多讀少,並且對容量比較敏感的業務場景。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31383567/viewspace-2951713/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- BiocManager安裝,devtools安裝dev
- Linux安裝解除安裝MySQLLinuxMySql
- linux 安裝yum 安裝phpLinuxPHP
- Ubuntu解除安裝和安裝Ubuntu
- 02 安裝git、安裝TortoiseGitGit
- cocoapods安裝/解除安裝/使用
- JDK安裝和解除安裝JDK
- ffmpeg安裝之mac安裝Mac
- docker安裝及解除安裝Docker
- [ 安裝 ] Zeppelin安裝步驟!
- win10安裝版怎麼安裝_安裝版win10安裝教程Win10
- ElasticSearch的安裝和使用,Postman的安裝,Kibana的安裝,EShead外掛的安裝ElasticsearchPostman
- Mac Redis安裝與解除安裝MacRedis
- 安裝了IDLE後安裝tensorflow
- kratos安裝及依賴安裝
- Linux 解除安裝openjdk 安裝oraclejdkLinuxJDKOracle
- debian安裝和解除安裝vmware
- JDK的安裝與解除安裝JDK
- linux 解除安裝jdk和安裝LinuxJDK
- 【推薦 - glibc安裝】MySQL - 安裝MySql
- linux下安裝snap安裝工具Linux
- [雲原生]Docker - 安裝&解除安裝Docker
- Ubuntu安裝和解除安裝mongodbUbuntuMongoDB
- window下安裝並使用nvm(含解除安裝node、解除安裝nvm、全域性安裝npm)NPM
- 安裝
- air安裝win10怎麼解除安裝_air安裝win10如何解除安裝AIWin10
- Centos Docker安裝、升級、解除安裝CentOSDocker
- Webpack學習 – Webpack安裝及安裝Web
- Linux-Ubuntu-mysql-安裝&解除安裝LinuxUbuntuMySql
- Centos7.9安裝解除安裝DockerCentOSDocker
- Centos7安裝安裝部署dockerCentOSDocker
- Linux系統安裝——Centos 7.6安裝LinuxCentOS
- PostgreSQL 10.12 安裝系列 - 原始碼安裝SQL原始碼
- PostgreSQL 10.12 安裝系列 - 本地RPM安裝SQL
- 【 Linux 軟體安裝 】- 1 JDK安裝LinuxJDK
- Python pip的安裝及解除安裝Python
- CentOS7安裝php、安裝MySqlCentOSPHPMySql