MariaDB
MariaDB is a versatile open-source relational database management system that serves as a drop-in replacement for MySQL with enhanced performance and additional features.
Supported Versions and Architectures
- Versions: 5.x, 10.x
- Architectures: Single-node or primary-replica
Supported Data Types
Category | Data Types |
---|---|
String | CHAR, VARCHAR, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, BINARY, VARBINARY |
Integer | TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT |
Numeric | DECIMAL, FLOAT, DOUBLE |
Date/Time | DATE, TIME, DATETIME, TIMESTAMP, YEAR |
Binary Large Objects | TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB |
Spatial Data | POINT, LINESTRING, POLYGON, GEOMETRY, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMCOLLECTION |
Other | BIT, ENUM, SET, JSON |
Quick Setup Guide
1. Create Database User
CREATE USER 'xpipes'@'%' IDENTIFIED BY 'your_password';
2. Grant Permissions
- Specific database
- All databases
GRANT SELECT ON your_database.* TO 'xpipes'@'%';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'xpipes'@'%';
GRANT SELECT ON *.* TO 'xpipes'@'%';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'xpipes'@'%';
3. Enable Binary Logging (for incremental sync)
Add to MariaDB configuration file (/etc/mysql/mariadb.cnf
):
[mysqld]
server-id = 1
log_bin = /var/log/mysql/mariadb-bin
binlog_format = ROW
binlog_row_image = FULL
expire_logs_days = 10
max_binlog_size = 100M
Restart MariaDB:
systemctl restart mariadb
Limitations
- MySQL compatibility: Some advanced MariaDB features may not be available in MySQL-compatible mode
- Version differences: Feature availability varies between MariaDB 5.x and 10.x series