§ GreatSQL User Manual (English)
This is the English edition of the GreatSQL 8.0.32-27 User Manual. The Chinese edition is available at Chinese User Manual.
Last updated: 2026-11-25.
This document applies to: GreatSQL 8.0.32-27.
§ About GreatSQL
GreatSQL is an open-source and free database that can meet the requirements of financial-grade application scenarios on commodity hardware. With features such as High Availability, High Performance, High Compatibility and High Security, it can serve as an ideal drop-in replacement for MySQL or Percona Server for MySQL.
§ Download GreatSQL
- Download the latest GreatSQL release (opens new window)
- Download historical GreatSQL releases (opens new window)
§ GreatSQL Core Features
§ High Availability
GreatSQL has made extensive improvements and enhancements to MGR and primary-secondary replication, supporting features such as zone tags, arbitrator nodes, dynamic read/write VIP, fast single-primary mode and smart primary election. It also deeply optimizes multiple underlying MGR working mechanisms and algorithms, including the flow control algorithm, transaction certification queue cleanup algorithm, node join & leave mechanism, recovery mechanism, and large transaction transfer compression, further strengthening MGR's high availability guarantees and performance stability.
- Supports the zone tags feature, improving data reliability in multi-datacenter architectures.
- Supports the arbitrator node feature, achieving higher availability at lower server cost.
- Supports the dynamic read/write VIP feature, making high availability switchovers more convenient and read load balancing faster. Supports proactively closing the currently active connections when the primary node switches, reducing the application-side unavailable time.
- Supports the fast single-primary mode, which is faster and delivers higher performance in single-primary mode.
- Supports the smart primary election feature, making the primary election mechanism during high availability switchover more reasonable.
- Optimizes the flow control algorithm, making transactions steadier and avoiding severe jitter.
- Supports recording events where MGR network communication overhead exceeds a threshold, for further analysis and optimization.
- Supports automatically choosing the member node with the latest transaction data to replicate from, which effectively improves Clone speed and enhances MGR service reliability.
- In primary-secondary replication, supports rate limiting when a secondary node initiates Binlog read requests to the primary node.
- Optimizes the fault detection efficiency in asynchronous connection failover (opens new window), reducing the time the replication link is disconnected and improving overall availability.
- Supports the loop prevention mechanism for primary-primary bidirectional replication in cross-datacenter disaster recovery scenarios.
- Optimizes the problem of severe performance jitter that may occur when MGR nodes join or leave.
- Resolves the problem where the entire MGR cluster is blocked when the disk space on an individual node runs full.
- Optimizes the MGR transaction certification queue cleanup algorithm, so the performance jitter every 60 seconds under high load no longer occurs.
- Resolves the problem where long transactions in MGR prevent primary election.
- Fixes the problem of long waiting during MGR recovery.
- Optimizes the handling mechanism when compression exceeds the limit during large transaction transfer in MGR.
For more information, see the document: High Availability.
§ High Performance
Compared with MySQL and Percona Server for MySQL, GreatSQL delivers more stable and superior performance. It supports the Rapid Engine, Turbo Engine, lock-free transactions, parallel LOAD DATA, asynchronous deletion of large tables, thread pool, non-blocking DDL, NUMA affinity scheduling optimization and other features. In TPC-C benchmarks it outperforms MySQL by over 30%, and in TPC-H benchmarks its performance is dozens or even hundreds of times that of MySQL.
- Supports the high-performance Rapid Engine with massive parallelism, in-memory queries and a high compression ratio, which can improve data analysis performance by several orders of magnitude.
- Supports the high-performance parallel query engine Turbo, giving GreatSQL multi-threaded concurrent vectorized real-time query capabilities.
- Optimizes the InnoDB transaction system, implementing multiple optimization approaches such as splitting large locks and making them lock-free, improving overall OLTP performance by about 20%.
- Supports parallel LOAD DATA, suitable for application scenarios that frequently import large batches of data, with performance improved by about 20 times or more; it is also optimized for scenarios without an explicitly defined primary key.
- Supports asynchronous deletion of large tables, improving the runtime performance stability of the InnoDB engine.
- Supports the thread pool, reducing the cost of thread creation and destruction, and ensuring stable performance without obvious degradation under high concurrency.
- Supports non-blocking DDL, avoiding the problem where a large number of business requests are blocked because the database must complete DDL operations as quickly as possible.
- Supports NUMA affinity optimization, binding front-end user threads and background threads to fixed NUMA nodes through NUMA affinity scheduling optimization to improve thread processing performance.
For more information, see the document: High Performance.
§ High Compatibility
GreatSQL is 100% fully compatible with MySQL and Percona Server for MySQL syntax, and supports most common Oracle syntax, including Data Type Compatibility, Function Compatibility, SQL Syntax Compatibility, Stored Routine Compatibility and many other compatible extension usages.
For more information, see the document: High Compatibility.
§ High Security
GreatSQL supports logical backup encryption, Clone backup encryption, auditing, GM (national cryptography) tablespace encryption, sensitive data masking, and storage of login history, among many other security enhancement features, further protecting business data security and making it more suitable for financial-grade application scenarios.
- Supports mysqldump logical backup encryption, meeting the secure encryption requirements of logical backups using mysqldump.
- Supports Clone backup encryption, meeting the secure encryption requirements of physical backups using Clone.
- Supports the auditing feature, promptly recording and discovering unauthorized or unsafe behavior.
- Supports GM (national cryptography) encryption algorithms for InnoDB tablespaces, ensuring the encryption security of important data.
- Supports two kinds of data masking based on functions and policies, keeping the query results of sensitive user data confidential.
- Supports storing login history, making it convenient for administrators to query and further improving database security.
Through the multiple security enhancement features above, business data security is further protected. For more information, see the document: High Security.
§ Others
- Supports Clone online full hot backup, incremental backup and recovery, and combined with Binlog, recovery to a specified point in time is possible. In addition, Clone backup also supports compression.
- Supports InnoDB Page transparent compression using the Zstd algorithm, further improving the data compression ratio, especially when there is a large amount of long-text duplicate data.
§ Installing GreatSQL
§ Installing jemalloc (recommended)
When running GreatSQL with jemalloc support, the memory allocation of the database process is more stable and efficient, so it is recommended to install jemalloc (not mandatory).
On ARM environments, it is not necessary to install and configure the jemalloc dependency.
Taking CentOS 8 x86_64 as an example, install the jemalloc package as follows:
# First install the EPEL repository
yum install -y epel-release
# Then install jemalloc
yum -y install jemalloc jemalloc-devel
2
3
4
5
You can also add the path of a self-installed dynamic library so file to the system configuration file, for example:
cat /etc/ld.so.conf
/usr/local/lib64/
2
Then run the following commands to load the libjemalloc library and confirm whether it exists:
ldconfig && ldconfig -p | grep libjemalloc
View the output
$ ldconfig && ldconfig -p | grep libjemalloc
...
libjemalloc.so.1 (libc6,x86-64) => /usr/local/lib64/libjemalloc.so.1
libjemalloc.so (libc6,x86-64) => /usr/local/lib64/libjemalloc.so
2
3
4
5
If jemalloc cannot be installed directly via yum, you can download the RPM package yourself from: https://centos.pkgs.org/8/epel-x86_64/jemalloc-5.2.1-2.el8.x86_64.rpm.html (opens new window)
§ Downloading and Installing GreatSQL
Installing the GreatSQL RPM package is recommended.
Click here to download the GreatSQL RPM packages (opens new window).
Taking CentOS 8 as an example, install GreatSQL with commands similar to the following:
# First, check whether GreatSQL is already installed
yum search greatsql
...
No matches found.
# Then install
rpm -ivh --nodeps greatsql-client-8.0.32-27.1.el8.x86_64.rpm greatsql-devel-8.0.32-27.1.el8.x86_64.rpm greatsql-icu-data-files-8.0.32-27.1.el8.x86_64.rpm greatsql-mysql-router-8.0.32-27.1.el8.x86_64.rpm greatsql-server-8.0.32-27.1.el8.x86_64.rpm greatsql-shared-8.0.32-27.1.el8.x86_64.rpm greatsql-test-8.0.32-27.1.el8.x86_64.rpm
2
3
4
5
6
7
Tip
When formally installing the GreatSQL RPM packages, dependencies on openssl, Perl and other packages may still be required. This is a quick demonstration, so the --nodeps parameter is added to skip the corresponding dependency checks. After installation, if the service cannot start due to missing dependencies, please install the corresponding software dependency packages.
After installation, GreatSQL initializes itself automatically. You can then check whether it has been registered as a system service or has already started:
systemctl status mysqld
View the output
$ systemctl status mysqld
...
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
...
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 1137698 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 1137732 (mysqld)
Status: "Server is operational"
Tasks: 39 (limit: 149064)
Memory: 336.7M
CGroup: /system.slice/mysqld.service
└─1137732 /usr/sbin/mysqld
...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
The GreatSQL service can now be started normally.
For more efficient operation of GreatSQL, it is recommended to refer to this my.cnf configuration template: my.cnf for GreatSQL 8.0.32-27 (opens new window).
§ Compiling the GreatSQL Source Code
If you want to compile binary packages from the GreatSQL source code, you can use the GreatSQL-Build Docker image to do so. See this project for details: GreatSQL-Build Docker image (opens new window).
If you want to manually compile the GreatSQL source code yourself, you can refer to the following documents:
- Compiling and Installing GreatSQL from Source Code on CentOS (opens new window)
- Compiling the GreatSQL RPM Package on CentOS (opens new window)
- Compiling GreatSQL Binary Packages on openEuler, Anolis OS and UOS (opens new window)
- Compiling and Installing GreatSQL from Source Code on Kylin OS + Loongson (opens new window)
Reminder: To compile, you need to download the GreatSQL source package (opens new window) rather than compiling directly from the source package obtained by git clone of this repository, because the code of some submodules is missing.
§ Release History
See the GreatSQL release history.
§ GreatSQL vs MySQL
| 1. Main Features | GreatSQL 8.0.32-27 | MySQL 8.0.32 |
|---|---|---|
| Open Source | ✔️ | ✔️ |
| ACID Integrity | ✔️ | ✔️ |
| MVCC | ✔️ | ✔️ |
| Row-level Locking | ✔️ | ✔️ |
| Automatic Crash Recovery | ✔️ | ✔️ |
| Table Partitioning | ✔️ | ✔️ |
| Views | ✔️ | ✔️ |
| Subqueries | ✔️ | ✔️ |
| Triggers | ✔️ | ✔️ |
| Stored Programs | ✔️ | ✔️ |
| Foreign Keys | ✔️ | ✔️ |
| Window Functions | ✔️ | ✔️ |
| Common Table Expressions (CTE) | ✔️ | ✔️ |
| GIS | ✔️ | ✔️ |
| GTID-based Replication | ✔️ | ✔️ |
| Group Replication (MGR) | ✔️ | ✔️ |
| MyRocks Engine | ✔️ | ❌ |
| LoongArch Support | ✔️ | ❌ |
| 2. Performance Enhancement Extensions | GreatSQL 8.0.32-27 | MySQL 8.0.32 |
| Rapid Engine | ✔️ | Cloud-only HeatWave |
| Turbo Engine | ✔️ | ❌ |
| NUMA Affinity Optimization | ✔️ | ❌ |
| Non-blocking DDL | ✔️ | ❌ |
| Import Optimization for Tables without Primary Keys | ✔️ | ❌ |
| InnoDB Parallel Query | ✔️ | Primary key scan only |
| Parallel LOAD DATA | ✔️ | ❌ |
| InnoDB Transaction ReadView Lock-free Optimization | ✔️ | ❌ |
| InnoDB Transaction Big-lock Splitting Optimization | ✔️ | ❌ |
| InnoDB Page Compression with zstd | ✔️ | ❌ |
| InnoDB Resource Groups | ✔️ | ✔️ |
| Custom InnoDB Page Size | ✔️ | ✔️ |
| Contention-Aware Transaction Scheduling | ✔️ | ✔️ |
| InnoDB Mutexes Splitting Optimization | ✔️ | ❌ |
| MEMORY Engine Optimization | ✔️ | ❌ |
| InnoDB Flushing Optimization | ✔️ | ❌ |
| Parallel Doublewrite Buffer | ✔️ | ✔️ |
| InnoDB Fast Index Creation Optimization | ✔️ | ❌ |
| Single-column Compression for VARCHAR/BLOB/JSON Types | ✔️ | ❌ |
| Single-column Compression Info Stored in the Data Dictionary | ✔️ | ❌ |
| 3. Developer-oriented Improvements | GreatSQL 8.0.32-27 | MySQL 8.0.32 |
| X API | ✔️ | ✔️ |
| JSON | ✔️ | ✔️ |
| NoSQL Socket-Level Interface | ✔️ | ✔️ |
| InnoDB Full-text Search Improvements | ✔️ | ❌ |
| More Hash/Digest Functions | ✔️ | ❌ |
| Oracle Compatibility - Data Types | ✔️ | ❌ |
| Oracle Compatibility - Functions | ✔️ | ❌ |
| Oracle Compatibility - SQL Syntax | ✔️ | ❌ |
| Oracle Compatibility - Stored Routines | ✔️ | ❌ |
| 4. Foundation Feature Improvements | GreatSQL 8.0.32-27 | MySQL 8.0.32 |
| MGR Improvement - Zone Tags | ✔️ | ❌ |
| MGR Improvement - Arbitrator Node | ✔️ | ❌ |
| MGR Improvement - Read/Write Node Bound VIP | ✔️ | ❌ |
| MGR Improvement - Fast Single-primary Mode | ✔️ | ❌ |
| MGR Improvement - Smart Primary Election | ✔️ | ❌ |
| MGR Improvement - New Flow Control Algorithm | ✔️ | ❌ |
| MGR Improvement - Network Partition Exception Handling | ✔️ | ❌ |
| MGR Improvement - Node Abnormal Exit Handling | ✔️ | ❌ |
| MGR Improvement - Node Disk Full Handling | ✔️ | ❌ |
| MGR Improvement - Automatic Donor Node Selection | ✔️ | ❌ |
| MGR Improvement - Large Transaction Compression Optimization | ✔️ | ❌ |
| Clone Incremental Backup | ✔️ | ❌ |
| Clone Backup Compression | ✔️ | ❌ |
| Binlog Read Rate Limiting | ✔️ | ❌ |
| Number of information_schema Tables | 95 | 65 |
| Global Performance and Status Metrics | 853 | 434 |
| Optimizer Histograms | ✔️ | ✔️ |
| Per-Table Performance Metrics | ✔️ | ❌ |
| Per-Index Performance Metrics | ✔️ | ❌ |
| Per-User Performance Metrics | ✔️ | ❌ |
| Per-Client Performance Metrics | ✔️ | ❌ |
| Per-Thread Performance Metrics | ✔️ | ❌ |
| Global Query Response Time Statistics | ✔️ | ❌ |
| Enhanced SHOW ENGINE INNODB STATUS | ✔️ | ❌ |
| Enhanced Rollback Segment Info | ✔️ | ❌ |
| Enhanced Temporary Table Info | ✔️ | ❌ |
| Enhanced User Statistics | ✔️ | ❌ |
| Enhanced Slow Log Info | ✔️ | ❌ |
| 5. Security Enhancements | GreatSQL 8.0.32-27 | MySQL 8.0.32 |
| GM (National Cryptography) Support | ✔️ | ❌ |
| Backup Encryption | ✔️ | ❌ |
| Auditing | ✔️ | Enterprise only |
| Data Masking | ✔️ | ❌ |
| Last Login Record | ✔️ | ❌ |
| SQL Roles | ✔️ | ✔️ |
| SHA-2 Password Hashing | ✔️ | ✔️ |
| Password Rotation Policy | ✔️ | ✔️ |
| PAM Authentication Plugin | ✔️ | Enterprise only |
| Keyring Stored in File | ✔️ | ✔️ |
| Keyring Stored in Hashicorp Vault | ✔️ | Enterprise only |
| InnoDB Data Encryption | ✔️ | ✔️ |
| InnoDB Log Encryption | ✔️ | ✔️ |
| InnoDB Tablespace File Encryption | ✔️ | ✔️ |
| Binary Log Encryption | ✔️ | ❌ |
| Temporary File Encryption | ✔️ | ❌ |
| Forced Encryption | ✔️ | ❌ |
| 6. Operational Convenience Improvements | GreatSQL 8.0.32-27 | MySQL 8.0.32 |
| DDL Atomicity | ✔️ | ✔️ |
| Data Dictionary Stored in InnoDB Tables | ✔️ | ✔️ |
| Fast DDL | ✔️ | ✔️ |
| SET PERSIST | ✔️ | ✔️ |
| Invisible Indexes | ✔️ | ✔️ |
| Threadpool | ✔️ | Enterprise only |
| Backup Locks | ✔️ | ❌ |
| Extended SHOW GRANTS | ✔️ | ❌ |
| Extended Table Corruption Actions | ✔️ | ❌ |
| Kill Inactive Transactions | ✔️ | ❌ |
| Extended START TRANSACTION WITH CONSISTENT SNAPSHOT | ✔️ | ❌ |
GreatSQL 8.0.32-27 is based on Percona Server for MySQL 8.0.32. On top of MySQL 8.0.32, it makes extensive improvements and enhancements and adds many new features. For details, see: Percona Server for MySQL feature comparison (opens new window). This includes features available only in MySQL Enterprise Edition, such as the thread pool, auditing and data masking, as well as many improvements and enhancements such as performance_schema enhancements, information_schema enhancements, performance and scalability improvements, enhanced user statistics, PROCESSLIST enhancements and Slow Log enhancements, which are not listed one by one here.
GreatSQL is also a GVP (Gitee Most Valuable Project) on the gitee (码云) platform. See: https://gitee.com/gvp/database-related (opens new window) in the Database-related category.
§ Licensing
GreatSQL is committed to keeping open source open. GreatSQL is licensed under the GPLv2 license.
Scan the QR code to follow our WeChat official account
