A MySQL and MariaDB alternative that keeps your client
Replace a MySQL or MariaDB server with Raft DB by changing the host and port only: which clients and statements carry over, what does not, and how to try it on a copy first.
Raft DB is a database server written in Rust that answers the MySQL wire protocol (raftdb-mysql, port 3306 by default). A MySQL or MariaDB driver, the mysql and mariadb command-line clients, and tools that use those drivers connect to it the way they connect to MySQL: you change the host, the port and the account, and nothing else in the application.
What stays the same#
- The driver and the connection string (
mysql://user:password@host:3306/database). - The SQL the application sends, as long as it does not use an item on the list of statements and functions not supported yet and functions not supported yet.
- Prepared statements, transactions and the data types in the SQL reference, which follows the order of the MySQL Reference Manual.
What is different#
- Raft DB is pre-release software. It has no long production track record; test it with your own application before it holds anything you cannot recreate.
- Isolation between SQL sessions is per table at the
READ-COMMITTEDlevel, not snapshot or repeatable read (transactions). - Replication is by the Raft consensus algorithm with a watcher quorum for automatic failover, not MySQL binary-log replication (replication overview).
- Anything specific to one storage engine of MySQL is not there; see what is not there yet.
Try it on a copy#
- Install Raft DB and make an account for the application.
- Import a copy of the data: import and export of SQL scripts.
- Point a test instance of the application at it and run the application's own tests.
- Read the MySQL, MariaDB and SQL Server guide before you move anything real.
See also: compare Raft DB with MySQL and MariaDB, connecting with clients.