Get Started with SkySQL

MariaDB SkySQL is a database-as-a-service (DBaaS) developed and managed by MariaDB Corporation. SkySQL is the only DBaaS to deliver MariaDB Platform, with MariaDB Enterprise Server, on expert-maintained multi-cloud infrastructure.

This guided walkthrough will take you through the following steps:

  1. Sign Up

  2. Launch

  3. Connect

  4. Import Data

  5. Optional sample data and application

Step 1 - Sign Up

MariaDB ID login page

Need additional guidance on this step? See Sign Up.

Step 2 - Launch

SkySQL Launch page

MariaDB SkySQL includes several workload-optimized database services to choose from:

Service

Topology

What this delivers

Distributed SQL

Xpand

Technical Preview of service backed by MariaDB Xpand. Delivers linear read and write scaling from 3 to 20 nodes, with self-healing data protection and fault tolerance.

Transactions

Galera

Technical Preview of service backed by MariaDB Enterprise Cluster (powered by Galera). Read scaling with virtually-synchronous replication in 3, 5, 7, or 9 node configuration.

Transactions

HA (Primary/Replica)

Production-ready service backed by MariaDB Replication. Read scaling with asynchronous or semi-synchronous replication for 1 Primary and 2 to 5 Replicas.

Transactions

Standalone

Single-node MariaDB Enterprise Server for development and testing.

Analytics

ColumnStore

Production-ready service backed by MariaDB ColumnStore with scalable object storage, highly available in a 3 node configuration. Also available as a single-node configuration for development and testing.

Smart Transactions

HTAP

Single-node hybrid transactional/analytical processing (HTAP) with InnoDB on durable block storage and MariaDB ColumnStore on scalable object storage.

  1. Optional: This guided walkthrough includes an optional sample database and application. If you plan to try the optional sample, launch a "Transactions" service in "Standalone" topology in the next steps.

  2. On the "Launch a Service" page, choose the desired service.

  3. After choosing a service to "Launch", you will choose service parameters and review pricing.

  4. After you "Launch Service", you'll see that your service is "Pending".

Need additional guidance on this step? See Launch.

Step 3 - Connect

Whitelist your IP

SkySQL blocks access to a database service except by whitelisted IP addresses.

  1. Click on the database name to access the Service Details page.

    SkySQL Service Detail view
  2. Click on the pencil icon to the right of the "Whitelisted IP Addresses" heading to access the "Update IP Addresses" page.

    SkySQL Service IP Whitelist
  3. Click on the "Add My IP Address" link to add your public IP address, then click "Submit".

Need additional guidance on this step? See IP Whitelist Control of Service Access.

Choose a Client

You can connect to your SkySQL database service once it moves from "Pending" state to "Healthy" state, and after you whitelist your IP address.

MariaDB SkySQL database services can be accessed from Linux, macOS, and Windows using a range of supported command-line and GUI clients, and connectors for many programming languages.

If you are new to MariaDB Server, we recommend choosing a GUI client like DBeaver (available for Linux, macOS, and Windows).

See the full list of supported clients and connectors.

Connect

There are a few details you will need for client setup:

  1. Click on the database name to access the Service Details page.

    SkySQL Service Detail view

    Here you will find:

    • Fully Qualified Domain Name (host)

    • Read-Write Port (port)

  2. Once the service is in a "Healthy" state, you can click on the "Show Credentials" button to view the Temporary Login Service Credentials page.

    SkySQL Show Credentials view

    Here you will find:

    • Default user (user)

    • Default password (password)

    • Certificate authority chain (ssl-ca)

  3. Since client setup is different for each supported client and connector, client-specific instructions are provided.

  4. You can connect to your SkySQL database service once it moves from "Pending" state to "Healthy" state, and after you whitelist your IP address.

Need additional guidance on this step? See Connect.

Step 4 - Import Data

Methods of importing data into MariaDB SkySQL vary depending on whether you are importing into transactional or analytical services.

Transactional Data

To import data into MariaDB SkySQL for transactional services like Standalone Server and HA (Primary/Replica):

  1. Use mariadb-dump to back up your existing data (excluding the mysql database) to an SQL file.

  2. Modify the backup, changing any DEFINER clauses to use a database user account configured on SkySQL.

  3. Use the MariaDB Client to connect to SkySQL and import the data into your SkySQL service.

Additional information is available in Importing Transactional Data.

Analytical Data

For each table of analytical data you want to import into MariaDB SkySQL:

  1. On your existing database, find the table schema with SHOW CREATE TABLE

  2. Use mariadb-dump to back up the table data into a TSV file.

  3. Connect to the SkySQL service with MariaDB Client using the --local-infile option.

  4. Use the CREATE DATABASE and CREATE TABLE statements to recreate the schema, setting the ENGINE table option to ColumnStore.

  5. Use the LOAD DATA INFILE to load the TSV data into the table.

Additional information is available in Importing Analytical Data.

Step 5 - Optional Sample

MariaDB provides a series of sample applications which you can use to explore and experiment with various MariaDB Connectors and MariaDB SkySQL services. As an example, this section covers the Todo sample app with MariaDB Connector/Node.js.

See Sample Apps for additional information on other sample apps and different Connectors.

Sample Apps features three tiers:

UI

A front-end web application written in React.js

API

A MariaDB Connector used by the UI to access SkySQL.

Back-end

A MariaDB SkySQL service.

Prerequisites

  • Download and install Node and NPM (Node Package Manager) from https://nodejs.org/en/download/ . You need node version v12.16.1.

    You can check for version with:

    $ node -v
    
  • Install git if you don't have it.

Create Sample Database

  1. Connect to your database service.

  2. Use CREATE DATABASE to create a database for the application:

    CREATE DATABASE todo;
    
  3. Use CREATE TABLE to create a table to store the todo entries:

    CREATE TABLE todo.tasks (
      id INT PRIMARY KEY AUTO_INCREMENT,
      description VARCHAR(500) NOT NULL,
      completed BOOLEAN NOT NULL DEFAULT 0
    ) ENGINE = InnoDB;
    

Install Todo

  1. Clone the Todo repository and change into the directory:

    $ git clone https://github.com/mariadb-corporation/dev-example-todo.git
    $ cd dev-example-todo
    
  2. Change to the API directory:

    $ cd dev-example-todo/api/nodejs
    
  3. Create an .env environment file to configure the API to connect to your SkySQL instance:

    DB_HOST = example.skysql.net
    DB_USER = db_user
    DB_PASS = db_user_passwd
    DB_PORT = 5001
    DB_NAME = todo
    
  4. Edit the db.js file and uncomment the variables to enable TLS connections (required by SkySQL):

    // SSL (e.g. SkySQL) connections
    // * Remember to change the location of "skysql_chain.pem" to wherever you placed it!
    // * To use just uncomment the two lines below and the 'ssl' property (and value) within the connection pool configuration
    
    const fs = require("fs");
    const serverCert = [fs.readFileSync("skysql_chain.pem", "utf8")];
    
  5. In the same file, set the serverCert constant, adjust the path to point the location of the skysql_chain.pem file on your file system:

    const serverCert = [fs.readFileSync("/path/to/skysql_chain.pem", "utf8")];
    
  6. In the mariadb.createPool() configuration, uncomment the ssl entry, so MariaDB Connector/Node.js uses the CA certificate:

    var pools = [
      mariadb.createPool({
        host: process.env.DB_HOST,
        user: process.env.DB_USER,
        password: process.env.DB_PASS,
        port: process.env.DB_PORT_1,
        database: process.env.DB_NAME,
        multipleStatements: true,
        connectionLimit: 5,
        ssl: {
          ca: serverCert
        }
      })
    ];
    
  7. Install and start the API

    $ npm install
    $ npm start
    
  8. In a separate terminal, start the client:

    $ cd dev-example-todo/client
    $ npm install
    $ npm start
    

The client is now running, and you can access it through your web browser at http://localhost:3000.

Result

Todo Application

Resources

Detailed Instructions

Sign Up

Registering for access to MariaDB SkySQL

Launch

Launch a new database service

Connect

Connect to your database service

Import Data

Load or import data to your database service

Services and Topologies

Service

Topology

What this delivers

Distributed SQL

Xpand

Technical Preview of service backed by MariaDB Xpand. Delivers linear read and write scaling from 3 to 20 nodes, with self-healing data protection and fault tolerance.

Transactions

Galera

Technical Preview of service backed by MariaDB Enterprise Cluster (powered by Galera). Read scaling with virtually-synchronous replication in 3, 5, 7, or 9 node configuration.

Transactions

HA (Primary/Replica)

Production-ready service backed by MariaDB Replication. Read scaling with asynchronous replication with 1 Primary and 2 to 5 Replicas.

Transactions

Standalone

Single-node MariaDB Enterprise Server for development and testing.

Analytics

ColumnStore

Production-ready service backed by MariaDB ColumnStore with scalable object storage, highly available in a 3 node configuration. Also available as a single-node configuration for development and testing.

Smart Transactions

HTAP ("Both")

Single-node hybrid transactional/analytical processing (HTAP) with InnoDB on durable block storage and MariaDB ColumnStore on scalable object storage.

Frequently Asked Questions (FAQ)

These questions and answers are popular for new SkySQL customers.

For a complete list of questions and answers, see the SkySQL Frequently Asked Questions (FAQ) list.

Can I use SkySQL?

Yes. MariaDB SkySQL is available for immediate use.

Is SkySQL ready for production use?

Yes. MariaDB SkySQL delivers enterprise-grade cloud database services for mission-critical applications. MariaDB SkySQL is built on MariaDB Enterprise Server, optimized for security, stability, and reliability in demanding production environments. Multi-node database deployments feature a rigorous SLA, High Availability (HA) features, operations features, and standard 24x5 support. Enterprise and Platinum support options extend support to 24x7, with the additional option of SkyDBA for reactive and proactive assistance from a team of expert DBAs. Security features are designed to meet the GRC and infosec challenges faced by modern applications, and DPA (GDPR) and BAA (HIPAA) are available.

Which transactional service should I use?

Based on scalability:

Scales

Benefit of More Nodes

Node Counts

Topology

Reads and Writes

Linear scaling of read/write performance

3 to 20

Xpand

Reads

Additional data copies for reads

3, 5, 7, or 9

Galera

Reads

Additional data copies for reads

1 Primary + 2-5 Replicas

HA (Primary/Replica)

N/A

N/A

1

Standalone

Based on high availability and data protection:

High Availability

Data Protection

Consistency

Topology

Automated Failover

Slices with self-healing, or full data copies

Synchronous

Xpand

Automated Failover

Full data copies

Virtually synchronous

Galera

Automated Failover

Full data copies

Async or semi-synchronous

HA (Primary/Replica)

N/A

N/A

N/A

Standalone

All MariaDB SkySQL services also feature Kubernetes self-healing.

Why would I choose a DBaaS over an on-premises deployment?

Our platform and experts handle the infrastructure needs, allowing you to focus on your core business.

When you choose MariaDB SkySQL, a full-featured DBaaS, you forego the capital expenditure of buying hardware, the delay of waiting for new systems to ship every time you need to scale-up or scale-out, and the overhead and opportunity-cost of tuning, monitoring, and upgrading your database. SkySQL also handles routine tasks such as nightly backups and infrastructure maintenance.

What does SkySQL cost?

SkySQL pricing varies based on the parameters chosen when you launch a service. Examples of parameters include provider, topology, instance and storage size, and region.

Does SkySQL have a free tier or free trial?

We provide $500 in free credits to get started. Please contact us for assistance if you need to execute a larger proof-of-concept (POC).

How do I contact support?

SkySQL customers can contact us via the Customer Support Portal.

If you are not yet a SkySQL customer, please contact us with questions.