Getting Started with MariaDB Xpand

MariaDB Xpand provides distributed SQL, high availability, fault tolerance, write scaling, and horizontal scale-out for transactional workloads. MariaDB Xpand can integrate with the Xpand storage engine in MariaDB Enterprise Server 10.5 and later.

MariaDB Xpand Deployment Process

  1. Choose a topology.

  2. Deploy MariaDB Xpand:

  3. Use the MariaDB Client to connect to the listener port on the MaxScale node:

    $ mariadb --host=192.0.2.10 \
       --port=3307 \
       --user=xpand_app_user \
       --password
    

    The listener port (Configure a Listener) should be specified by the --port option. When the listener uses TCP port 3306, you do not need to specify the port to the client.

    The user account (Create Application Database User) should be specified by the --user option.

    MaxScale's Read/Write Split Router (Configure Read/Write Split Router) will route the connection to one of the Xpand nodes (Configure Server Objects).

  4. Use the CREATE DATABASE statement to create the database:

    CREATE DATABASE IF NOT EXISTS xpand_db;
    

    Note

    In an Xpand Storage Engine Topology, MariaDB Xpand does not synchronize databases automatically. In that topology, MariaDB Replication can synchronize databases and other objects. Without replication, the database needs to be created separately on each node.

  5. Use the CREATE TABLE statement to create the table:

    CREATE TABLE xpand_db.xpand_tab (
       id INT PRIMARY KEY AUTO_INCREMENT,
       str VARCHAR(50)
    );
    

    Note

    In an Xpand Storage Engine Topology, it is necessary to set ENGINE=Xpand.