StoneDB 是由石原子科技公司自主设计、研发的国内首款基于 MySQL 内核打造的开源 HTAP(Hybrid Transactional and Analytical Processing)融合型数据库,可实现与 MySQL 的无缝切换。StoneDB 具备超高性能、实时分析等特点,为用户提供一站式 HTAP 解决方案。
StoneDB 100% 兼容 MySQL 5.6、5.7、8.0 协议和 MySQL 生态等重要特性,支持 MySQL 常用的功能及语法,支持 MySQL 生态中的系统工具和客户端,如 Navicat、Workbench、mysqldump、mydumper。由于 100% 兼容 MySQL,因此 StoneDB 的所有工作负载都可以继续使用 MySQL 数据库体系运行。
[mysql@centos7 ~]$ cat /opt/stonedb57/install/data/mysqld.log |grep password 2023-07-05T01:29:07.594205Z 1 [Note] A temporary password is generated for root@localhost: KrsiqidHq6:k [mysql@centos7 ~]$ /opt/stonedb57/install/bin/mysql -uroot -p -S /opt/stonedb57/install/tmp/mysql.sock Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.36-StoneDB-v1.0.4}
Copyright (c) 2021, 2022 StoneAtom Group Holding Limited Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> alter user 'root'@'localhost' identified by 'stonedb123'; Query OK, 0 rows affected (0.00 sec)
5. 可以使用 GUI 工具连接
可以新建用户,并用 GUI 工具连接,更加直观方便快捷的感受 StoneDB。
新特性体验
1. 支持 update ignore 语法
当更新 TIANMU 引擎的表时,主键冲突的记录将被跳过,并执行后续的更新操作。
关于 TIANMU 引擎, 是 StoneDB 的默认引擎,当前版本支持 MySQL 5.7,具体基线版本为 MySQL 5.7.36,这使得 StoneDB 可以兼容 MySQL 5.7 协议。
1 2 3 4 5 6 7 8 9
mysql> show engines; +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ ... | TIANMU | DEFAULT | Tianmu storage engine | YES | NO | NO | ... +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+ 10 rows in set (0.00 sec)
3. 支持在 union, union all 中使用 select <数字> 或者 select <数字> from dual
测试表延用上例,具体演示如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
mysql>select id from t1 unionselect1; +----+ | id | +----+ |8| |1| +----+ 2rowsinset (0.00 sec)
mysql>select id from t1 unionallselect2from dual; +----+ | id | +----+ |8| |8| |2| +----+ 3rowsinset (0.00 sec)
遇到的问题与建议
github 上的 Release Assets 建议加上 md5/sha256 校验码
centos 7.9 上安装时遇到冲突,需要先移除冲突的包,再进行安装
1 2 3 4
Transaction check error: file /usr/lib64/libsnappy.so.1 from install of stonedb_5.7-1.0.4-1.el7.x86_64 conflicts with file from package snappy-1.1.0-3.el7.x86_64 file /usr/lib64/libmarisa.so.0 from install of stonedb_5.7-1.0.4-1.el7.x86_64 conflicts with file from package marisa-0.2.4-4.el7.x86_64 file /usr/lib64/libzstd.so.1 from install of stonedb_5.7-1.0.4-1.el7.x86_64 conflicts with file from package libzstd-1.5.0-1.el7.x86_64
如果本机已安装mysql/mariadb 需要先移除冲突的包,再进行安装
1 2 3 4 5 6
Installing : stonedb_5.7-1.0.4-1.el7.x86_64 ln: failed to create symbolic link ‘/usr/bin/mysql’: File exists ln: failed to create symbolic link ‘/usr/bin/mysqldump’: File exists warning: %post(stonedb_5.7-1.0.4-1.el7.x86_64) scriptlet failed, exit status 1 Non-fatal POSTIN scriptlet failure in rpm package stonedb_5.7-1.0.4-1.el7.x86_64 Verifying : stonedb_5.7-1.0.4-1.el7.x86_64
[mysql@centos7 ~]$ /opt/stonedb57/install/mysql_server start Starting Stonedbbasedir::: /opt/stonedb57/install/ bindir::: /opt/stonedb57/install//bin datadir::: /opt/stonedb57/install/data/ mysqld_pid::: /opt/stonedb57/install/data/mysqld.pid 2023-07-05T01:34:13.490822Z mysqld_safe Logging to '/opt/stonedb57/install/data/centos7.shawnyan.com.err'. 2023-07-05T01:34:13.519549Z mysqld_safe Starting mysqld daemon with databases from /opt/stonedb57/install/data .............................2023-07-05T01:34:45.163734Z mysqld_safe mysqld from pid file /opt/stonedb57/install/data/mysqld.pid ended /opt/stonedb57/install/mysql_server: line 264: kill: (114313) - No such process [FAILED]
日志里的内容:
1 2 3
2023-07-05T01:30:52.630770Z 0 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use 2023-07-05T01:30:52.630850Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ? 2023-07-05T01:30:52.630879Z 0 [ERROR] Aborting