server
MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Top Related Projects
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.
Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch
CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
Seamless multi-primary syncing database with an intuitive HTTP/JSON API, designed for reliability
The MongoDB Database
Official Git mirror of the SQLite source tree
Quick Overview
MariaDB Server is an open-source relational database management system (RDBMS) that is a fork of the popular MySQL database. It is designed to be a drop-in replacement for MySQL, providing the same functionality and API, while also introducing new features and improvements.
Pros
- Performance Improvements: MariaDB has been optimized for performance, with features like the ColumnStore storage engine and advanced query optimization techniques.
- Enhanced Security: MariaDB includes several security enhancements, such as improved user authentication and encryption capabilities.
- Expanded Functionality: MariaDB has added new features and capabilities beyond the original MySQL, including support for JSON data, improved geospatial functions, and better handling of large datasets.
- Active Development: The MariaDB project is actively maintained and developed, with regular releases and a large community of contributors.
Cons
- Compatibility Concerns: While MariaDB is designed to be compatible with MySQL, there may be some minor differences in syntax or behavior that can cause issues when migrating from MySQL.
- Limited Enterprise Support: Compared to MySQL, which is backed by Oracle, MariaDB may have fewer enterprise-level support options and resources available.
- Smaller Ecosystem: The ecosystem of third-party tools and integrations for MariaDB may not be as extensive as the one for MySQL, which has been around for a longer time.
- Potential Vendor Lock-in: Some organizations may be hesitant to adopt MariaDB due to concerns about potential vendor lock-in, as the project is primarily developed and maintained by the MariaDB Corporation.
Getting Started
To get started with MariaDB Server, you can follow these steps:
- Download the appropriate version of MariaDB for your operating system from the official website.
- Install the MariaDB server package on your system.
- Start the MariaDB server using the appropriate command for your operating system (e.g.,
systemctl start mariadbon Linux). - Connect to the MariaDB server using a client tool, such as the built-in
mysqlcommand-line client:
mysql -u root -p
- Create a new database and table:
CREATE DATABASE my_database;
USE my_database;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
email VARCHAR(255)
);
- Insert some data into the table:
INSERT INTO users (name, email) VALUES
('John Doe', 'john.doe@example.com'),
('Jane Smith', 'jane.smith@example.com'),
('Bob Johnson', 'bob.johnson@example.com');
- Query the data from the table:
SELECT * FROM users;
- Explore the MariaDB documentation and community resources to learn more about the advanced features and capabilities of the database.
Competitor Comparisons
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.
Pros of MySQL Server
- Larger community and more extensive ecosystem of tools and resources
- Better performance for read-heavy workloads and specific use cases
- More frequent updates and releases
Cons of MySQL Server
- Proprietary licensing for some features and enterprise editions
- Less transparent development process compared to MariaDB
- Slower adoption of new features and innovations
Code Comparison
MySQL Server:
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
email VARCHAR(100) UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
MariaDB Server:
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
email VARCHAR(100) UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
The basic SQL syntax for creating tables is identical in both MySQL and MariaDB, as MariaDB was originally forked from MySQL. However, differences may arise in advanced features, storage engines, and specific optimizations. For example, MariaDB supports additional storage engines like Aria and ColumnStore, which are not available in MySQL.
Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch
Pros of Postgres
- More advanced features like table inheritance and custom data types
- Better support for concurrent transactions and ACID compliance
- Stronger community-driven development with frequent updates
Cons of Postgres
- Generally slower performance for read-heavy workloads
- Higher resource consumption, especially memory usage
- Steeper learning curve for administration and optimization
Code Comparison
Postgres:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
MariaDB:
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
The main differences in this example are:
- Postgres uses
SERIALfor auto-incrementing columns, while MariaDB usesAUTO_INCREMENT - Postgres supports
WITH TIME ZONEfor timestamp columns, offering better timezone handling - Syntax for default values is slightly different
Both databases offer similar basic SQL functionality, but Postgres generally provides more advanced features and stricter adherence to SQL standards.
CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
Pros of CockroachDB
- Designed for horizontal scalability and distributed architecture
- Built-in support for geo-partitioning and multi-region deployments
- Strong consistency model with serializable isolation
Cons of CockroachDB
- Higher resource consumption and overhead
- Steeper learning curve for administration and optimization
- Limited support for legacy applications and tools
Code Comparison
MariaDB (SQL syntax):
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255),
email VARCHAR(255) UNIQUE
);
CockroachDB (SQL syntax):
CREATE TABLE users (
id INT PRIMARY KEY DEFAULT unique_rowid(),
name STRING,
email STRING UNIQUE
);
Both databases use SQL, but CockroachDB has some syntax differences:
- Uses
STRINGinstead ofVARCHAR unique_rowid()function for auto-incrementing IDs- No need for explicit
AUTO_INCREMENTkeyword
CockroachDB also supports distributed SQL operations:
CREATE TABLE users (
id INT PRIMARY KEY,
name STRING,
email STRING UNIQUE
) PARTITION BY LIST (id) (
PARTITION us VALUES IN (1, 2, 3),
PARTITION eu VALUES IN (4, 5, 6)
);
This partitioning feature allows for geo-distributed data storage, which is not natively supported in MariaDB.
Seamless multi-primary syncing database with an intuitive HTTP/JSON API, designed for reliability
Pros of CouchDB
- Document-oriented NoSQL database, ideal for flexible schema and JSON data
- Built-in support for multi-master replication and offline-first applications
- RESTful HTTP API for easy integration with web applications
Cons of CouchDB
- Less suitable for complex relational data structures and joins
- May require more storage space due to document-based storage model
- Limited support for complex queries compared to SQL databases
Code Comparison
MariaDB (SQL):
CREATE TABLE users (
id INT PRIMARY KEY,
name VARCHAR(50),
email VARCHAR(100)
);
INSERT INTO users VALUES (1, 'John Doe', 'john@example.com');
CouchDB (JSON):
{
"_id": "user:1",
"name": "John Doe",
"email": "john@example.com"
}
Summary
MariaDB is a relational database system, while CouchDB is a document-oriented NoSQL database. MariaDB excels in structured data and complex queries, whereas CouchDB offers flexibility and easy replication. The choice between them depends on the specific requirements of your project, such as data structure, scalability needs, and application architecture.
The MongoDB Database
Pros of MongoDB
- Flexible schema design allows for easier adaptation to changing data structures
- Better performance for large-scale, high-volume data operations
- Native support for JSON-like documents, simplifying data modeling for modern applications
Cons of MongoDB
- Less mature and battle-tested compared to MariaDB's long history
- Lacks built-in support for complex joins and transactions (prior to version 4.0)
- Higher memory usage due to document-based storage model
Code Comparison
MongoDB query:
db.users.find({ age: { $gt: 18 } }).sort({ name: 1 })
MariaDB query:
SELECT * FROM users WHERE age > 18 ORDER BY name ASC;
Key Differences
- MongoDB uses a document-based model, while MariaDB uses a relational model
- MongoDB queries are typically written in JavaScript, MariaDB uses SQL
- MongoDB scales horizontally more easily, MariaDB excels in vertical scaling
- MariaDB offers stronger ACID compliance out of the box
- MongoDB provides better support for unstructured and semi-structured data
Both databases have their strengths and are suited for different use cases. MongoDB shines in scenarios requiring flexibility and scalability, while MariaDB is ideal for applications with complex relationships and strict data integrity requirements.
Official Git mirror of the SQLite source tree
Pros of SQLite
- Serverless and self-contained, requiring no external dependencies
- Extremely lightweight and portable, ideal for embedded systems and mobile apps
- Zero-configuration setup, making it easy to use out of the box
Cons of SQLite
- Limited concurrency support, not suitable for high-volume multi-user applications
- Lacks advanced features like user management and fine-grained access control
- Limited scalability compared to full-fledged database management systems
Code Comparison
SQLite:
sqlite3 *db;
sqlite3_open("example.db", &db);
sqlite3_exec(db, "CREATE TABLE users (id INTEGER, name TEXT);", NULL, NULL, NULL);
sqlite3_close(db);
MariaDB:
MYSQL *conn;
conn = mysql_init(NULL);
mysql_real_connect(conn, "localhost", "user", "password", "database", 0, NULL, 0);
mysql_query(conn, "CREATE TABLE users (id INT, name VARCHAR(255));");
mysql_close(conn);
Both examples demonstrate basic database operations, but SQLite's simplicity is evident in its serverless nature and lack of connection parameters.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
MariaDB Server
MariaDB Server is one of the most widely deployed open source relational databases. It is built by a global community of contributors together with the MariaDB Foundation and MariaDB plc, and it powers workloads from small applications to large-scale production systems.
MariaDB began as a fork of MySQL, led by the original MySQL developers, and it maintains a high degree of MySQL compatibility. It has since grown into a database with its own capabilities, including native vector search, multiple pluggable storage engines, synchronous clustering, and analytical features, while remaining a straightforward migration target for existing MySQL deployments.
Key features
- Native vector search. A built-in VECTOR data type with approximate nearest-neighbour indexing (HNSW), available since MariaDB 11.8 with no extension required.
- Pluggable storage engines. InnoDB (default for transactional workloads), Aria, MyRocks, ColumnStore for analytics, Spider for sharding, and S3 for archival, among others.
- Replication and clustering. Asynchronous, semi-synchronous, and parallel replication with global transaction IDs, plus Galera synchronous multi-primary clustering.
- Advanced SQL. Common table expressions and recursive CTEs, window functions, system-versioned (temporal) tables, sequences, and a broad set of JSON functions.
- MySQL and Oracle compatibility. Wire-protocol and syntax compatibility with MySQL, plus an Oracle SQL mode supporting PL/SQL-style stored routines.
- Spatial and full-text search. GIS data types and functions, and built-in full-text indexing.
- Security. Role-based access control, pluggable authentication (ed25519, PAM, GSSAPI, and more), data-at-rest encryption, and TLS for connections.
Documentation
- Project home, community, and getting involved
- Reference manual and release notes
- MariaDB compared to MySQL
Releases
MariaDB Server follows a yearly long-term support (LTS) model alongside quarterly rolling releases. Binary LTS releases are maintained for three years and are recommended for production; rolling releases deliver new features sooner with a shorter support window.
For the current version and full history, see Releases and the MariaDB release calendar.
Installing
Packages and installation instructions for all supported platforms are available at https://mariadb.org/download/.
Building from source
To build MariaDB from source and run the test suite, follow the developer guide
It covers building the code correctly, running the MariaDB testing framework, and choosing the right branch to target for contributions.
Contributing
Contributions are welcome, from code and documentation to bug reports and reviews. See CONTRIBUTING.md to get started, and CODING_STANDARDS.md for code style. Contributors and community members are recognised in CREDITS.
Getting help
- Zulip chat
- Maria Discuss mailing list
- Bug reports
- Security vulnerabilities: see SECURITY.md
Licensing
MariaDB Server is licensed under version 2 of the GNU General Public License (GPLv2), without the "any later version" clause. This is inherited from MySQL. License information is in the COPYING file, and third-party license information is in the THIRDPARTY file.
About MariaDB Foundation
MariaDB is brought to you by the MariaDB Foundation and MariaDB plc. The MariaDB Foundation is the custodian of the MariaDB Server codebase, ensuring it stays open and that anyone can contribute. See CREDITS for details on the Foundation and the people developing MariaDB.
MySQL, the base of MariaDB, is a product and trademark of Oracle Corporation, Inc.
Top Related Projects
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.
Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch
CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
Seamless multi-primary syncing database with an intuitive HTTP/JSON API, designed for reliability
The MongoDB Database
Official Git mirror of the SQLite source tree
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot