Create a Linode account to try this guide with a $ credit.
This credit will be applied to any valid services used during your first  days.

Galera provides a performant MariaDB database solution with synchronous replication to achieve high availability. Galera is deployed with MariaDB, which is an open-source database management system that uses a relational database and SQL (Structured Query Language) to manage its data. MariaDB was originally based off of MySQL and maintains backward compatibility.

Marketplace App Cluster Notice
This Marketplace App deploys 3 Compute Instances to create a highly available and redundant MariaDB Galera cluster, each with the plan type and size that you select. Please be aware that each of these Compute Instances will appear on your invoice as separate items. To instead deploy MariaDB on a single Compute Instance, see Deploy MySQL/MariaDB through the Linode Marketplace.

Deploying a Marketplace App

The Linode Marketplace lets you easily deploy an application cluster on Compute Instances using Cloud Manager. See Get Started with Marketplace Apps for complete steps.

  1. Log in to Cloud Manager and select the Marketplace link from the left navigation menu. This displays the Linode Create page with the Marketplace tab pre-selected.

  2. Under the Select App section, select the cluster app you would like to deploy. Marketplace Apps that are deployed as clusters have a cluster label next to the app’s name.

  3. Complete the form by following the steps and advice within the Creating a Compute Instance guide. Depending on the Marketplace App you selected, there may be additional configuration options available. See the Configuration Options section below for compatible distributions, recommended plans, and any additional configuration options available for this Marketplace App.

  4. Click the Create Linode button. Once the first Compute Instance has been provisioned and has fully powered on, wait for the software installation to complete. If the instance is powered off or restarted before this time, the other Compute Instances may never be deployed and the software installation will likely fail.

To verify that the app has been fully installed, see Get Started with Marketplace Apps > Verify Installation. Once installed, follow the instructions within the Getting Started After Deployment section to access the application and start using it.

Note
Estimated deployment time: The Galera cluster should be fully deployed and configured within 5-10 minutes after the first Compute Instance has finished provisioning.

Configuration Options

  • Supported distributions: Ubuntu 22.04 LTS
  • Recommended plan: Depends on the size of your MySQL database and the amount of traffic you expect.

Galera Options

  • Cluster Name (required): Enter the name you wish to use for this cluster deployment.

  • Linode API Token (required): Your API token is used to deploy additional Compute Instances as part of this cluster. At a minimum, this token must have Read/Write access to Linodes. If you do not yet have an API token, see Get an API Access Token to create one.

  • Add SSH Keys to all nodes (required): If you select yes, any SSH Keys that are added to the root user account (in the SSH Keys section), are also added to your limited user account on all deployed Compute Instances.

  • Galera cluster size: This field cannot be edited, but is used to inform you of the number of Compute Instances that are created as part of this cluster.

TLS/SSL Certificate Options

The following fields (in addition to the domain field above) are used when creating your self-signed TLS/SSL certificate.

  • Country or region (required): Enter the country or region for you or your organization.
  • State or province (required): Enter the state or province for you or your organization.
  • Locality (required): Enter the town or other locality for you or your organization.
  • Organization (required): Enter the name of your organization.
  • Email address (required): Enter the email address you wish to use for your certificate file. This email address may receive notifications about the state of your certificate, including when it is expired.
  • CA Common name: This is the common name for the self-signed Certificate Authority.
  • Common name: This is the common name that is used for the domain.
Warning
Do not use a double quotation mark character (") within any of the App-specific configuration fields, including user and database password fields. This special character may cause issues during deployment.

Getting Started after Deployment

Using MySQL/MariaDB

The standard tool for interacting with MariaDB is the mysql client which installs with the mysql-server package. The MariaDB client is used through a terminal.

Root Login

  1. To log in to MySQL as the root user:

    sudo mysql -u root -p
  2. When prompted, enter the MySQL root password that you set when launching the Marketplace App. You’ll then be presented with a welcome header and the MySQL prompt as shown below:

    MariaDB [(none)]>
  3. To generate a list of commands for the MySQL prompt, enter \h. You’ll then see:

    List of all MySQL commands:
    Note that all text commands must be first on line and end with ';'
    ?         (\?) Synonym for `help'.
    clear     (\c) Clear command.
    connect   (\r) Reconnect to the server. Optional arguments are db and host.
    delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
    edit      (\e) Edit command with $EDITOR.
    ego       (\G) Send command to mysql server, display result vertically.
    exit      (\q) Exit mysql. Same as quit.
    go        (\g) Send command to mysql server.
    help      (\h) Display this help.
    nopager   (\n) Disable pager, print to stdout.
    notee     (\t) Don't write into outfile.
    pager     (\P) Set PAGER [to_pager]. Print the query results via PAGER.
    print     (\p) Print current command.
    prompt    (\R) Change your mysql prompt.
    quit      (\q) Quit mysql.
    rehash    (\#) Rebuild completion hash.
    source    (\.) Execute an SQL script file. Takes a filename as an argument.
    status    (\s) Get status information from the server.
    system    (\!) Execute a system shell command.
    tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
    use       (\u) Use another database. Takes database name as argument.
    charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
    warnings  (\W) Show warnings after every statement.
    nowarning (\w) Don't show warnings after every statement.
    
    For server side help, type 'help contents'
    
    MariaDB [(none)]>
  4. Grant access to the database that you created when launching the Marketplace App for MySQL User. In this example, the database is called webdata, the user webuser, and password of the user is password. Be sure to enter your own password. This should be different from the root password for MySQL:

    GRANT ALL ON webdata.* TO 'webuser' IDENTIFIED BY 'password';
  5. To Exit MySQL/MariaDB type:

    exit

Create a Sample Table

  1. Log back in as MySQL User that you set when launching the Marketplace App. In the following example the MySQL User is webuser.

    sudo mysql -u webuser -p
  2. Create a sample table called customers. This creates a table with a customer ID field of the type INT for integer (auto-incremented for new records, used as the primary key), as well as two fields for storing the customer’s name. In the following example webdata is the database that you created when launching the Marketplace App.

    use webdata;
    create table customers (customer_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name TEXT, last_name TEXT);
  3. To view the contents of the table that you created:

    describe customers;

    The output would be:

    +-------------+---------+------+-----+---------+----------------+
    | Field       | Type    | Null | Key | Default | Extra          |
    +-------------+---------+------+-----+---------+----------------+
    | customer_id | int(11) | NO   | PRI | NULL    | auto_increment |
    | first_name  | text    | YES  |     | NULL    |                |
    | last_name   | text    | YES  |     | NULL    |                |
    +-------------+---------+------+-----+---------+----------------+
  4. Then exit MySQL/MariaDB.

    exit

Next Steps

Note
Currently, Linode does not manage software and systems updates for Marketplace Apps. It is up to the user to perform routine maintenance on software deployed in this fashion.

For more on MySQL/MariaDB, checkout the following guides:

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on


Your Feedback Is Important

Let us know if this guide was helpful to you.