All pages
1 of 35

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

MariaDB

With IONOS Cloud Database as a Service (DBaaS), you can quickly set up and manage the MariaDB database engine. You can use the database engine's features, such as the flexible cloud-based scaling of the database resources, patching the database, creating backups and redundancy, and enhancing security with IONOS DBaaS.

Bulk Data Export: You can now export data in bulk by submitting a request to IONOS Cloud Support. For more information, see Bulk Data Export.

Product Overview

Quick Links

Developer Tools

Frequently Asked Questions (FAQ)

Overview

IONOS DBaaS for MariaDB is fully integrated into the Data Center Designer and has a dedicated API. You may also launch it via automation tools like Ansible and Terraform.

MariaDB is a reliable, scalable, and secure Relational Database Management System (RDBMS). IONOS DBaaS assures the configured database is automatically provisioned, thus saving time and ensuring your business runs smoothly without disruption. DBaaS gives you access to the capabilities of the MariaDB database engine, ensuring you can use the same code, applications, and tools you already use in your existing databases with DBaaS.

You can order a cluster of multiple redundant nodes with automatic failover for high availability. For more information, see High Availability and Scaling.

The IONOS DBaaS for MariaDB automatically creates and stores backups of your MariaDB content regularly, which is capable of a point-in-time restore. Backups happen automatically to reduce your workload further and ensure that you can swiftly resume operations in the event of a failure.

It is mandatory to specify a periodic maintenance time window for regular maintenance. During the maintenance time window, you may encounter a short, occasional downtime, typically caused by restarting the MariaDB or switching to another replica.

The illustration shows how MariaDB can be created and managed using IONOS DBaaS.

As shown in the illustration, you can order and manage a MariaDB database cluster using the or the corresponding . Simultaneously, you can choose the LAN, the VDC, and the IP address on which the MariaDB should be available. The IONOS Cloud DBaaS Backend provisions the MariaDB cluster according to your request. The primary instance of the MariaDB cluster will be available on your LAN within the VDC and on the chosen IP address after provisioning.

Supported MariaDB Versions

IONOS Cloud supports "MariaDB Long-Term Support (LTS) versions" (example: 10.6, 10.11), starting from MariaDB 10.6.

The IONOS Cloud DBaaS takes care of minor version upgrades during maintenance windows, for example, from 10.11.6 to 10.11.7. For more information, see .

Locations

DBaaS for MariaDB is offered in all IONOS Cloud locations. You can use DBaaS instances running MariaDB in the IONOS Cloud infrastructure. For more information about the regional API endpoints, see .

Security

A MariaDB cluster comes with an x509 certificate for Transport Layer Security (TLS). You can enforce this transport encryption with the client option --ssl-verify-server-cert.

Features and Benefits

Features

  • ACID Compliance: MariaDB ensures data integrity and reliability through the support of Atomicity, Consistency, Isolation, and Durability (ACID) properties.

  • Triggers and Stored Procedures: MariaDB allows the creation of database triggers to automatically perform actions based on specified events and stored procedures for executing sets of SQL statements.

MariaDB

Quickly set up and manage the MariaDB database engine with IONOS Cloud DBaaS. Utilize features like flexible scaling, patching, backups, redundancy, and enhanced security.

Use Cases

Explore the key use cases for implementing the MariaDB database engine.

DCD How-Tos

Learn how to create and manage MariaDB clusters via the DCD.

API How-Tos

Learn how to create and manage MariaDB clusters via the API.

Troubleshooting

Learn how to troubleshoot common issues with MariaDB.

MariaDB REST API

Access the REST API documentation for MariaDB.

MariaDB SDKs

Interact with the MariaDB API using SDKs.

Config Management Tools

Explore configuration management tools compatible with MariaDB.

FAQ

To get answers to the most commonly encountered questions about MariaDB.

DCD
API
Upgrade and Maintenance
Endpoint
MariaDB on IONOS DBaas
  • User Management and Security: Database access can be restricted to authorized users only. Role-based access control, robust encryption support, and user management tools ensure secure access and data protection.

  • Indexes and Storage Engines: MariaDB supports various types of indexes to enhance query performance. In addition, it supports storage engines such as InnoDB, MyISAM, and Aria, thus offering flexibility and performance optimization for different use cases.

  • Query Optimizer and Performance Tuning: MariaDB's query optimizer and performance tuning capabilities help improve database efficiency and query execution speed.

  • Full-Text Search: Integrated full-text search support enables efficient and flexible text searching within large volumes of data.

  • Data Compression: Data compression techniques reduce storage requirements and improve query performance.

  • Columns Support:

    • Virtual (Computed) Columns enable column definitions based on expressions, thus enhancing data retrieval capabilities.

    • Dynamic Columns capability allows storing different column sets for each row, thus enabling flexible schema design.

  • Transactional Support: Comprehensive transaction support, allowing complex operations with rollback capabilities for data integrity.

  • SQL Support: Full support for standard SQL and JSON functionalities, facilitating seamless integration with existing applications and tools.

  • IONOS DBaaS Features

    • Upgrades: IONOS DBaaS supports user-defined maintenance windows with minimal service disruption. The database may be unreachable for a few seconds when necessary for restarts or switching to another replica. Single-node clusters temporarily gain a second node when it is necessary to replace the old one. Hence, maintenance downtime is the same for multi-node and single-node clusters.

    • Backups: Base backups are carried out daily, with Point-in-Time recovery for one week, ensuring data integrity and quick recovery in case of data loss.

    • Database Monitoring and Reporting: MariaDB provides tools for performance monitoring, query analysis, and reporting to help optimize database usage and identify potential issues.

    • Self-restore a MariaDB cluster: IONOS DBaaS for MariaDB allows you to automatically restore your MariaDB clusters to a prior state or point in time. In unanticipated circumstances, this dependable feature minimizes data loss and reduces downtime. For more information, refer to the instructions for restoring via the or the .

    Benefits

    • Easy Configuration: Configure your MariaDB instance in compliance with IONOS DBaaS's specifications. You can quickly create databases and tables, define user roles, and assign permissions similar to a physical database using SQL commands, IONOS's graphical interface, or API commands.

    • Scalable: Because of MariaDB's vertical scalability, storage, memory, and cores may be added to match the growing demand for greater processing power for data.

    • High availability: Automatic node failure handling for multi-node clusters.

    • Security: The communication between clients and databases is secured using TLS for secure data transmission if your MariaDB database is set up to use it.

    • Programmatic Resource Management: Easy deployment and management in cloud environments through APIs, SDKs, and configuration management tools.

    • Resources: It is offered on Enterprise VM, with a dedicated CPU, storage, and RAM. Currently, SSD is the only supported storage option for MariaDB.

    • Network: DBaaS supports private LANs only.

    • JSON and GIS Support: Effectively storing and querying spatial data and JSON documents is possible with native support for Geographic Information System (GIS) and JSON functions.

    DCD
    API

    High Availability and Scaling

    Cluster options

    Single-node cluster: A single-node cluster only has one "primary node". This node accepts customer connections and performs read and write operations. It is a single point of truth and a single point of failure.

    Multi-node cluster: A multi-node cluster contains one "primary node" and one or more "secondary nodes" replicating data from the primary node. The secondary nodes always attempt to keep up-to-date with the primary, but they may lag due to the asynchronous replication. If the current primary node fails, a secondary node elevates to the primary node. The old primary node is automatically fixed and turned secondary.

    Database scaling

    You can scale the existing database clusters using "horizontal" and "vertical" scaling.

    Horizontal scaling is defined as configuring the number of nodes that run in parallel. You can increase or decrease the number of nodes in a cluster.

    Scaling up the number of nodes does not cause a disruption. However, decreasing may cause a switchover, if the current primary node is removed.

    Note: This method of scaling is used to provide high availability. It will not increase the database performance.

    Vertical scaling refers to configuring the size of the individual nodes to process more data and queries. You can change the number of cores and the memory size to have the configuration you need.

    During scaling, the existing nodes in a cluster are modified after being turned off. In the event of scaling up or down, the downtime is minimal when there are multiple nodes, as the secondary nodes are modified first, followed by the resources. After the modification is complete, the primary node is switched automatically over to a secondary node and the connection is established.

    Replication modes

    The synchronization_mode determines how transactions are replicated between multiple nodes before a transaction is confirmed to the client. IONOS DBaaS supports only the asynchronous (default) replication mode for MariaDB, wherein the first transaction commit is always on the master, followed by replication to the standby node(s).

    Asynchronous replication sends a transaction confirmation back to the user immediately after the transaction is written to disk on the primary node without waiting for the standby. Replication takes place in the background. The cluster can lose some committed (not yet replicated) transactions during a failover to a secondary node in an asynchronous mode. The performance penalty of asynchronous replication depends on the workload.

    MariaDB uses an asynchronous replication mechanism. The primary node's binary log needs to be enabled to save data and make structural changes in the binary log. For more information, refer to the .

    Warning: You may lose your data if the server crashes while your data is pending replication.

    Synchronization mode considerations

    Please note that the synchronization mode can impact DBaaS in several ways:

    Aspect
    Asynchronous

    Switchover and Failover Processes

    Switchover process

    For administrative reasons, automatic switchovers happen in a controlled, planned manner during the scheduled maintenance. However, data is preserved during a switchover.

    During a switchover, the IP address of the primary server is moved to the promoted replica server. Meanwhile, the client is signaled about the switchover by closing the TCP connection on the server. The client automatically closes the connection and reconnects to the database.

    Limitations

    Following are a few limitations that you can encounter while using MariaDB.

    • The total upper limit for the Number of CPUs depends on your quota. A single instance cannot exceed 16 cores. For more information, see .

    • The total upper limit for RAM Size depends on your quota. A single instance cannot exceed 32 GB.

    • The upper limit for Storage Size is 2 TB.

    Resource Usage

    Calculate disk requirements

    The requested disk space stores all the data that MariaDB is working with, including database logs and binary log files. Each MariaDB instance contains storage of the configured size. IONOS manages and stores the applications and operating system independently from the configured storage.

    MariaDB rejects further write requests if the disk exceeds the storage limit. Ensure that you order enough storage to keep the MariaDB cluster operational. You can monitor the storage utilization in the DCD.

    You can also verify if the tables are oversized. For more information, refer to the . Bloated tables can consume space, so we recommend diagnosing the cause and reclaiming the free space. For more information, see .

    Failover process

    IONOS DBaaS MariaDB has an automatic failover enabled by default. A failover can occur when the primary node fails. As a result, one of the replicas is chosen and promoted to be the new primary node. When the old primary node returns, it is added as a replica to the cluster.

    Note: You may lose the data if it is not replicated but only committed to the primary node.

    For a single-node cluster, you may expect downtime before the Virtual Machine (VM) restarts because the node is modified in place.

    Warning: The connection to the database will be terminated if it is connected to an application. Additionally, all ongoing queries will be aborted causing disruption. Hence, we recommend that you perform scaling outside of peak hours.

    You can also increase the size of storage. However, it is not possible to reduce the size of the storage, nor can you change the type of storage. Increasing the size is done on the fly and causes no disruption.

    Primary failure

    A healthy standby will be promoted if the primary node becomes unavailable.

    Standby failure

    No effect on primary. Standby catches up once it is back online.

    Consistency model

    Strongly consistent except for lost data.

    Data loss during failover

    Non-replicated data is lost.

    Data loss during primary storage failure

    Non-replicated data is lost. Because replication is asynchronous, it is possible that the secondary primary has not yet received all events in the case that the active primary crashes.

    Latency

    Limited by the performance of the primary node.

    MariaDB Documentation

    Storing cluster backups in an IONOS S3 Object Storage is limited to the last seven days.

  • The following IP ranges cannot be used with MariaDB services:

    • 10.208.0.0/12

    • 10.233.0.0/18

    • 192.168.230.0/24

    • 10.233.64.0/18

  • Select the required number of resources
    Log files

    Database log files and binary log files are stored on the same disk as the database. DBaaS deletes older log files automatically with the expire_logs_days in a typical operation mode. The older files are deleted after a retention period of seven days. For more information, refer to the MariaDB Documentation.

    MariaDB Documentation
    Diagnose Table Bloating

    Logs

    IONOS DBaaS stores the generated logs on the same disk as the database. Log files are rotated according to their size to conserve the disk space. Log messages are subject to a 7-day retention policy.

    Logs are generated for the following:

    • Connections established during a session creation

    • Disconnections when the session terminates

    • Statements that run for at least 5 seconds

    • Statements that result in an error

    For more information, refer to the .

    Note: Currently, IONOS does not allow updating the log generation configuration.

    Binary logs

    MariaDB uses for continuous archiving and replication.

    The binary logs record every change to the database. MariaDB deletes older log files automatically with the expire_logs_days in a typical operation mode. It means that binary log files, regular database log files such as audit logs, error logs, and client logs are deleted. For more information, refer to the .

    Password hashing

    Ensure that the client library is up-to-date and supports the mysql_native_password authentication. For more information, refer to the . The following links on the MariaDB website can help you with:

    • . For more information about resetting the database password, see .

    Connection encryption

    All client connections are encrypted using TLS. To secure communications with the MariaDB Server using TLS, you need a private key and an X509 certificate for the server. Server certificates are issued by Let's Encrypt. For more information about certificates, refer to the .

    Certificates are issued for the DNS name of the cluster which is assigned automatically during creation and will look similar to ma-98tcp98ofe.qa.mariadb.fr-par.ionos.com. It is available via the IONOS API as the dnsName property of the cluster resource.

    Here is how to verify the certificate using MariaDB with ssl option:

    Prerequisites

    Follow the network specifications and resource considerations listed on this page to successfully set up a MariaDB cluster.

    Network configuration

    To set up a database inside an existing data center, you should have at least one server in a private LAN. You need to choose an IP address, under which the database leader should be made available.

    There is currently no IP address management for databases. If you use your subnet, you may use any IP address in that corresponding subnet. You must choose the IP address of the subnet that IONOS assigns you if your servers use DHCP. The IP address of the subnet can be found in your NIC configuration.

    Resource considerations

    CPU, RAM, storage, and number of database clusters are counted against quotas. Database performance depends on the storage type. Currently, IONOS supports only storage type, by default.

    The are stored alongside the database. The amount of files can grow and shrink depending on your workload. For a reasonable performance, we recommend that you set the SSD's storage size to at least 100 GB.

    Database backups

    All database clusters are backed up automatically. For more information, see .

    Troubleshooting

    Get help troubleshooting common issues with MariaDB.

    Upgrade and Maintenance

    IONOS Cloud updates and patches your database cluster to achieve high standards of functionality and security. This includes minor patches for MariaDB and patches for the underlying operating system. Generally, these updates are unnoticeable and do not interrupt your operation. However, occasionally, IONOS restarts your MariaDB instance to allow the changes to take effect.

    Prerequisites

    • Prepare for a downtime during the version upgrade.

    • Ensure the database cluster has enough available storage. While the upgrade is space-efficient (because it does not copy the data directory), some temporary data is written to the disk.

    Note: Updates to a new minor version are always backward compatible. Such updates occur during the maintenance window with no additional actions from the user.

    Currently, MariaDB only supports minor upgrades. IONOS replaces the mariadb executable binaries with those from a newer version, followed by the execution of the mariadb-upgrade command.

    The process replicates data from the old version to the new version and the database switches to the new version. For more information about the upgrade process, refer to the .

    Any changes that could cause service interruptions, such as version upgrades, are performed during a one-hour weekly maintenance window, which may result in brief connection interruptions. We recommend reconnecting to resume and complete any transactions that may have been affected during the maintenance window. For more information about how to configure maintenance windows for MariaDB, see .

    Note: Maintenance operations are initiated during the scheduled one-hour weekly maintenance window, but the duration may extend depending on the task. For example, tasks such as data replication may require additional time.

    Working with MariaDB

    Although IONOS DBaaS does not grant superuser access to MariaDB services, you may still view database clusters and perform administrator-level activities.

    DBaaS services offered by IONOS Cloud

    All back-end tasks necessary to keep your database operating at peak efficiency are handled by the IONOS platform. You can perform the following:

    • Database installation via the DCD or the DBaaS API.

    • Pre-set database configuration and configuration management options.

    • Automated backups for seven days with point-in-time restore.

    • Regular patches and upgrades during maintenance.

    • Service monitoring both for the database and the underlying infrastructure.

    Database administration

    Tasks related to the optimal health of the database remain your responsibility. These include:

    • Optimization

    • Data organization

    • Index creation

    • Statistics modification

    Restore a MariaDB Cluster from a Backup

    The request restores a MariaDB cluster from a backup.

    Prerequisites

    The backup must:

    • belong to the MariaDB cluster to be restored.

    • be in the AVAILABLE state.

    Request

    Info: The sample UUID in the example is 498ae72f-411f-11eb-9d07-046c59cc737e.

    Response

    You will receive a 202 Successful operation when the request is complete.

    Reset your Database Password

    A user's identity in MariaDB is determined by their username and host combination. If you have numerous users from different source hosts, you will need to reset the password for each user. To reset your database password, connect to the MariaDB cluster and run either of the following commands using the user whose password should be changed:

    • SET PASSWORD = PASSWORD('<new password>');

    • SET PASSWORD = '<passwordhash>';

    Reset your database password using the commands

    Delete a MariaDB Cluster

    To delete a MariaDB cluster, follow these steps:

    A list of all MariaDB clusters is displayed.

    2. Click in the OPTIONS column and select Delete.

    Alternatively, you can also choose a MariaDB cluster by clicking on its name and in the Details window, select x Delete cluster.

    3. Select Delete in the dialog box to confirm deletion.

    Diagnose Table Bloating

    Tables can become bloated during regular operation, meaning they consume more disk space than is required. The causes can be deletions or updating large amounts of data, resulting in the following:

    • The disk of the MariaDB cluster runs out of space.

    • MariaDB tables might be bloated.

    Query optimization by reviewing access plans

    Diagnose Table Bloating

    Learn how to troubleshoot the cause of table bloating.

    Reset your Database Password

    Learn how to reset your database password.

    SSD Premium
    binary log files
    Automatic backups
    MariaDB Documentation
    Set Up a MariaDB Cluster
    MariaDB Documentation
    binary logs
    MariaDB Documentation
    MariaDB Documentation
    Setting passwords
    Authentication
    Reset your Database Password
    MariaDB Documentation
    curl -X 'POST' \
      'https://mariadb.de-txl.ionos.com/clusters/{clusterId}/restore' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
          "backupId": "498axce2f-411f-11eb-9d07-046c80cc737e",
          "recoveryTargetTime": "2020-12-10T13:37:50+01:00"
    }'
    Solution

    To overcome the fragmentation of the tables, they have to be rewritten. This causes data to be stored in a physically optimal way. MariaDB stores the information about bloat in the data_free column of information_schema.tables.

    1. Diagnose the problem by finding bloated tables. You can use the following query:

    Warning: In particular, if there are numerous databases or tables in the instance, frequent querying from information_schema.tables is expensive and, hence, should be avoided. Querying invokes heavy filesystem operations and can lead to substantial performance impacts during the execution of the query.

    Note: When the table statistics are not up to date, the table size computation in information_schema.tables may not work as expected, and the queries may display incorrect values for a particular table. You can use ANALYZE TABLE <tablename> instead to sort the problem and refresh the table statistics.

    When you use InnoDB Full-Text Search, it creates additional files, consuming added space on the filesystem, but does not show up in the information_schema.tables. You can determine the size by querying information_schema.innodb_sys_tablespaces.

    1. Reclaim free space. You can follow the steps for InnoDB and MyISAM accordingly:

    • InnoDB To rewrite a InnoDB table, execute ALTER TABLE <table_name> ENGINE INNODB or ALTER TABLE <table_name> FORCE.

    Warning: During the rewrite, the tables are blocked for writing access. To minimize the downtime, you can execute ALTER with ALGORITHM=COPY, LOCK=NONE.

    For easy generation of all ALTER TABLE statements, we recommend using the following SQL statement:

    SELECT CONCAT('ALTER TABLE `', TABLE_SCHEMA, '.', TABLE_NAME, '` ENGINE InnoDB;') FROM information_schema.tables WHERE `TABLE_TYPE` = 'BASE TABLE' AND `ENGINE` = 'InnoDB'

    • MyISAM You can use the OPTIMIZE TABLE command to rewrite a MyISAM table and reclaim all disk space from data_free. Example: OPTIMIZE TABLE <table_name>;

    While the OPTIMIZE TABLE command is designed for the MyISAM storage engine to reorganize and optimize data files, it also supports InnoDB for compatibility reasons. Internally, when the command is executed but notices that the table uses InnoDB and not MyISAM, the command executes ALTER TABLE <table_name> FORCE instead of manually optimizing the table.

    curl https://crt.sh/?d=9314791 > ca.crt
    mariadb ${args} --ssl-ca=$(pwd)/ca.crt [--ssl-verify-server-cert]
    SELECT table_name, data_free 
    FROM information_schema.tables 
    WHERE table_schema = '*database_name*' and data_free > 0 
    ORDER BY data_free desc; 
    Result: The STATE of the respective MariaDB cluster is set to DESTROYING before it is completely deleted.
    MariaDB clusters in a destroying state
    Delete a MariaDB cluster
    Delete the selected MariaDB cluster

    Use Cases

    IONOS DBaaS MariaDB is a flexible database engine that is a perfect fit for facilitating enterprise-level analytics and solutions to drive online web applications for both individual use and business purposes. Due to its open-source nature, improved performance and MySQL compatibility, it is liked by developers and companies alike.

    Scenario 1: Data warehousing and analytics

    Precondition

    The price and overhead of managing voluminous data for businesses and individuals rise as the data increases.

    Solution

    MariaDB can be recommended for various instances where extensive data is stored and analyzed. Its high-availability environment ensures minimized downtime and continuous availability of data. Here are some scenarios where it can be implemented:

    • Web Applications: MariaDB is highly scalable, provides fast and reliable data retrieval, and can support sudden spikes in traffic. Hence, it can be used for web applications as a backend database, because it can handle the data storage needs of a dynamic website or web application.

    • Healthcare Systems: It is ideally suited for the secure and scalable storage and management of healthcare information, medical records, and patient data.

    • E-commerce Organizations: With its ability to manage user accounts, transactional data, and product catalogs, it is an ideal match for e-commerce platforms. Its ACID compliance ensures integrity and data consistency.

    Scenario 2: Corrupted data cluster

    Precondition

    Restoring data to its previous state manually can become a tedious and time-consuming task.

    Solution

    The self-restore feature for MariaDB in IONOS DBaaS can be beneficial in various use cases where data recovery or restoration to a specific point in time is necessary. You can restore a MariaDB cluster from the backup via the or using the . Here are some common use cases:

    • Accidental Data Deletion: In situations where critical data is accidentally deleted from the MariaDB cluster, the self-restore feature enables you to roll back the cluster to a point before the deletion occurs, helping to recover lost data effectively.

    • Data Corruption: If the MariaDB cluster experiences data corruption due to software issues or hardware failures, the self-restore feature allows you to restore the cluster to a consistent state before the corruption, ensuring data integrity and minimizing the impact of the corruption.

    • Human Errors: Mistakes made during operations such as incorrect updates or changes can be resolved by using the self-restore feature to revert the cluster to a state where the errors did not exist, preventing potential data inconsistencies.

    Restore a MariaDB Cluster from a Backup

    With IONOS DBaaS, you may roll back your MariaDB clusters to a previous point in time or use it to create a new cluster. This reliable function prevents data loss and downtime in unexpected situations.

    For example, consider that certain values were accidentally deleted from your MariaDB cluster around 11 hours today. The easiest way to recover missing data is to restore a backup before 11 hours.

    Result: You can restore only one backup at a time, and you must wait for the restoration process to finish before restoring another backup.

    Prerequisites

    • The backup must belong to the MariaDB cluster to be restored.

    • The cluster must be in the AVAILABLE state.

    Restore a Cluster

    To restore a cluster, follow these steps:

    2. Select a MariaDB cluster from the list by clicking on its name. Alternatively, click Details in the OPTIONS column.

    3. The Details window displays the necessary information of the chosen cluster. For more information, see .

    • Point In Time Recovery displays the earliest backup available for restoration. Select Restore backup to choose the date and time for backup restoration.

    a. In the Restore backup pop-up window, click within the text box to open the Calendar.

    b. Backups are available only for those dates that are available for selection. Select a date and click Ok.

    c. Select the Clock icon to set a time for restoring the appropriate backup from the chosen day and click Ok to confirm your selection.

    d. Select Restore to proceed with the restoration.

    e. Select Restore to confirm the restoration.

    Result: You will receive a confirmation that the cluster will be restored, and the respective cluster's STATE is set to RESTORING.

    View the list of MariaDB Clusters

    After creation, you can view the list of MariaDB clusters and delete them if they are no longer required.

    To view a list of the clusters, follow these steps:

    • In the DCD, go to Menu > Databases > MariaDB.

    Result: A list of all MariaDB clusters is displayed. You will see the following details:

    • NAME: Displays the name of the cluster. Select the name of the cluster to view its .

    • STATE: Displays the state of the respective MariaDB cluster:

      • CREATING: When the cluster is in the creation mode.

      • BUSY: When the cluster is being updated. For example, after modifying its details or after restoration.

    View individual Cluster details

    To view the details of each cluster in the Details window:

    2. You can navigate to the Details window using either of these options:

    • Select the name of the cluster.

    • Selecting Details from the OPTIONS column.

    3. You can view the following:

    • Properties: Displays the cluster's UUID, DNS name, its version, state, the number of instances created, and the data center location where it is located.

    • Instance configuration: Displays the number of CPUs utilized, RAM size and the storage used.

    • Datacenter connection: Displays the name of the data center, the associated LAN, and the dedicated private IP address.

    • Maintenance period:

    FAQ

    Will DBaaS be offered on Cloud Cubes?

    DBaaS is only available on Virtual Servers at this time. There may be support for Cloud Cubes in the future.

    What happens when the connection reaches its limits?

    Depending on the library you are using, you may see an error message similar to the following:

    Too many connections

    How do we prevent reaching the connection limit?

    As each user has 250 connections and max_connections is set to 500, it is less probable that a user will use up all of their connections with MariaDB.

    Can I scale the deployment to increase its connection limit?

    Unfortunately, it is not allowed to scale the deployment for increasing connection limits.

    What are the supported backup methods?

    IONOS provides an automated backup within the cloud infrastructure. You can use the mariadb-dump client to back up data to a different location. For more information, refer to the .

    What are the main considerations for latency and performance?

    Achieving high availability and minimal latency are the main goals of the IONOS Cloud. We recommend that you host your application servers closer to your database and in a appropriate for your user base to reduce the adverse effects of network latency on your application. For more information, refer to the .

    Backups

    MariaDB supports both automatic and manual backups. In addition, you can also use the self-restore function via the API to restore MariaDB clusters from a backup.

    Automatic backups

    IONOS, by default, performs automatic backups, which are full backups that run regularly at a specific hour based on the value set in the DBaaS component. Automatic backups are created in either of the following instances:

    • During the creation of a cluster.

    • Upon upgrading the current version of MariaDB to a higher version.

    • When a Point-In-Time-Recovery operation is conducted.

    Note: IONOS maintains backups for the last seven days so that you can recover them for up to a week.

    Manual backup

    IONOS facilitates the "logical" backup option using mariadb-dump. Alternatively, you can also use the mariadb-dump client to back data to a different location. For more information, refer to the .

    Self-Restore MariaDB Clusters from the Backup

    IONOS DBaaS offers a self-restore feature to restore MariaDB clusters, which allows an efficient restoration of your clusters from a backup to a previous state or point in time without manual intervention. It reduces downtime and minimizes data loss in case of unforeseen events. You can either use the or the to self-restore your MariaDB clusters.

    The following are some of the features and benefits of self-restore:

    • Point-in-Time Recovery: You can restore your MariaDB clusters to a specific point in time. For example, you can roll back the cluster to a state before data corruption, accidental deletions, etc.

    • Automated Process: The automated process significantly streamlines and reduces the time and effort required to restore a MariaDB cluster. You can initiate the restore process through the API.

    • Data Consistency: It ensures that the restored MariaDB cluster is consistent and matches the data state at the specified point in time. It helps maintain data integrity and coherence across applications interacting with the respective MariaDB cluster.

    Verify the Status of a MariaDB Cluster

    The database will be deployed in about five minutes after the creation of your first MariaDB cluster. For more information about creating a MariaDB cluster, see Create a MariaDB Cluster.

    You can manually verify whether the create request is successful because the notification mechanism is not yet available. However, you can poll the API to see when the state switches to AVAILABLE. You can use the following command:

    Initialize the database and connect it to the cluster

    You can connect to your MariaDB cluster soon after its creation. For example, you can connect using the ssh command as follows and the credentials that you set in the :

    You can use the following command to set the environment:

    Alternatively, you can use the following commands to connect to the database:

    Description
    Command

    Manage access

    You can create additional users, roles, databases, and other objects via the SQL. These operations are highly dependent on your database architecture.

    The PUBLIC role is a special role in which all database users inherit the permissions. This is also important if you want to have a user without write permissions, since by default PUBLIC is only allowed to write to the public schema.

    For more information about managing databases, refer to the .

    Create Users

    The CREATE USER statement can be used to create one or more user accounts in the MariaDB database. Only users with the global CREATE USER privilege or the INSERT privilege for the MySQL database can create users. For more information, refer to the .

    Result: You now have a ready-to-use MariaDB cluster.

    Retrieve all Backups of a MariaDB Cluster

    You can retrieve all backups of a specific MariaDB cluster using its clusterId. Specify a limit to limit the maximum number of elements returned and define pagination using offset.

    Request

    curl -X 'GET' \
      'https://mariadb.de-txl.ionos.com/clusters/{clusterId}/backups' \
      -H 'accept: application/json'

    Note: Remember to replace the clusterId with a valid ID.

    Response

    200 Successful operation

    Connect from Kubernetes

    This topic describes connecting to MariaDB from your managed Kubernetes cluster.

    Prerequisites

    Ensure that the following are available before connecting to the database:

    • A datacenter with the following id: xyz-my-datacenter.

    • A private LAN with id 3 using the network 10.1.1.0/24.

    • A database connected to LAN 3 with the following IP address: 10.1.1.5/24.

    • A Kubernetes cluster with the following id: xyz-my-cluster.

    Connect to the database from the cluster

    In this example, we use DHCP to assign IP addresses to node pools. Therefore, the database must be in the same subnet as the DHCP server.

    To enable connectivity, follow these steps:

    1. Connect node pools to the private LAN, which is connected to the database:

    Note: It may take a while for the node pool to be ready.

    1. Create a pod to test the connectivity. Schedule the pod exclusively for the node pools connected to the additional LAN if you have several node pools.

    Alternatively, you can also use the following commands:

    1. Create the pod: kubectl apply -f pod.yaml

    2. Attach the pod and test connectivity:

    Result: The database starts accepting connections.

    Delete a MariaDB Cluster

    You can delete a MariaDB cluster using its UUID. The response body will provide details about the cluster's UUID once a MariaDB cluster has been created or when obtaining a list of clusters.

    Request

    Note: Remember to update your UUID. The sample UUID in the example is 498ae72f-411f-11eb-9d07-046c59cc737e.

    Response

    202 Successful operation

    API How-Tos

    This section provides detailed guides and examples on how to interact with the MariaDB REST API. Each guide covers specific tasks such as creating, managing, and deleting MariaDB clusters, as well as handling backups and connecting from Kubernetes.

    Quick Links

    Fetch a MariaDB Cluster

    You can retrieve a MariaDB cluster using its UUID. It is found in the response body when a MariaDB cluster is created or when you retrieve a list of MariaDB clusters using GET.

    Request

    To query a single cluster, you need the id from your create response.

    List MariaDB Clusters

    You can retrieve a list of MariaDB clusters and also specify the maximum number of elements to be returned by specifying an integer for limit and defining the pagination using offset.

    Additionally, you can also use a response filter (filter.name) to list only the MariaDB clusters that contain the specified name.

    Request

    Fetch a specific Backup of a MariaDB Cluster

    You can retrieve a specific backup of a MariaDB cluster using its ID. You can find the ID when you the list of all MariaDB cluster backups. You can specify an integer for limit to return the maximum number of elements and define the pagination using offset.

    Request

    while [[ $(curl -sXGET "https://mariadb.de-txl.ionos.com/clusters/${UUID}" -H "Authorization: Bearer ${TOKEN}" | jq -r .metadata.state) != "AVAILABLE" ]]; do
      sleep 5
      clear
      echo -e "Cluster status:\n"
      kg mariadbcluster "${UUID}" -ojsonpath='{.status.conditions}' | yq -P
      echo -e "\ncluster is not available yet, waiting 5 seconds..."
    done

    Security Incidents: In the event of a security breach or unauthorized access that compromises the MariaDB cluster, the self-restore feature can be used to restore the cluster to a secure state before the security incident occurred, protecting sensitive data.

  • Testing and Development: The self-restore feature can also be useful for testing and development purposes. Developers can create snapshots of the database at different points in time and use the self-restore feature to easily revert to specific states for testing new features or debugging code.

  • Compliance and Auditing: For regulatory compliance requirements or auditing purposes, the self-restore feature allows users to demonstrate the ability to restore data to a specific point in time, ensuring data retention policies and compliance standards are met.

  • DCD
    APIs
    MariaDB Documentation
    geographic location
    MariaDB Documentation

    User Control: You have complete control over the restoration process, allowing you to select a specific point in time for the restoration process and monitor its progress.

    MariaDB Documentation
    DCD
    API

    via the IP address

    mysql -u username -h "${DATABASE_IP}" --password=password

    via the DNS name

    mysql --ssl -u username --password=password -h "${DNS_NAME}"

    POST request
    MariaDB Documentation
    MariaDB Documentation
    {
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "items": [
        {
          "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
          "properties": {
            "clusterId": "498ae72f-411f-11eb-9d07-046c59cc737e",
            "earliestRecoveryTargetTime": "2021-10-23T01:21:10Z",
            "size": 2052,
            "baseBackups": [
              {
                "created": "2020-12-10T13:37:50+01:00",
                "size": 543
              }
            ]
          }
        }
      ],
      "offset": 200,
      "limit": 100,
      "total": 200,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
    ionosctl
    curl -X 'DELETE' \
      'https://mariadb.de-txl.ionos.com/clusters/498ae72f-411f-11eb-9d07-046c59cc737e' \
      -H 'accept: application/json'

    Note:

    • Remember to update your UUID. The sample UUID in the example is 498ae72f-411f-11eb-9d07-046c59cc737e.

    • Your cluster runs in the default port 3306 and you cannot modify or configure it.

    Response

    202 Successful operation

    curl -X 'GET' \
      'https://mariadb.de-txl.ionos.com/clusters/498ae72f-411f-11eb-9d07-046c59cc737e' \
      -H 'accept: application/json'
    Response

    202 Successful operation

    curl -X 'GET' \
      'https://mariadb.de-txl.ionos.com/clusters?limit=100&offset=200' \
      -H 'accept: application/json'

    Note: Remember to replace the backupId with a valid ID.

    Response

    200 Successful operation

    curl -X 'GET' \
      'https://mariadb.de-txl.ionos.com/backups/{backupId}' \
      -H 'accept: application/json'
    retrieve
    {
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "properties": {
        "clusterId": "498ae72f-411f-11eb-9d07-046c59cc737e",
        "earliestRecoveryTargetTime": "2021-10-23T01:21:10Z",
        "size": 2052,
        "baseBackups": [
          {
            "created": "2020-12-10T13:37:50+01:00",
            "size": 543
          }
        ]
      }
    }
    ssh -i .ignore.id_rsa "root@${CUSTOMER_PUBLIC_IP}"
    DATABASE_IP="CUSTOMER_PUBLIC_IP"
    read -p "DNS Name: " DNS_NAME
    CREATE USER user@abc IDENTIFIED BY 'password';
    GRANT SELECT ON table.t2 to 'user'@'%';
    ionosctl k8s nodepool create --cluster-id xyz-my-cluster --datacenter-id xyz-my-datacenter --lan-ids 3 --dhcp=true --name=my_nodepool
    # pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
      name: connectivity-test
      labels:
        role: connectivity-test
    spec:
      containers:
      - name: connectivity-test
        image: mysql
        stdin: true
        tty: true
        command:
          - "/bin/bash"
    kubectl attach -it connectivity-test
    mysql -u <USERNAME> -p -h <DNS_NAME> --execute \"SHOW DATABASES;\"
      {
      "type": "cluster",
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "metadata": {
        "createdDate": "2020-12-10T13:37:50+01:00",
        "createdBy": "[email protected]",
        "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedDate": "2020-12-11T13:37:50+01:00",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "state": "DESTROYING"
      },
      "properties": {
        "displayName": "MariaDB cluster",
        "mariadbVersion": "10.6",
        "dnsName": "ma-yourcluster.mariadb.region.ionos.com",
        "instances": 2,
        "ram": 2,
        "cores": 4,
        "storageSize": 10,
        "connections": [
          {
            "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
            "lanId": "2",
            "cidr": "192.168.1.100/24"
          }
        ],
        "maintenanceWindow": {
          "time": "16:30:59",
          "dayOfTheWeek": "Monday"
        }
      }
    }
    {
      "type": "cluster",
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "metadata": {
        "createdDate": "2020-12-10T13:37:50+01:00",
        "createdBy": "[email protected]",
        "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedDate": "2020-12-11T13:37:50+01:00",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "state": "AVAILABLE"
      },
      "properties": {
        "displayName": "MariaDB cluster",
        "mariadbVersion": "10.6",
        "dnsName": "ma-yourcluster.mariadb.region.ionos.com",
        "instances": 2,
        "ram": 2,
        "cores": 4,
        "storageSize": 10,
        "connections": [
          {
            "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
            "lanId": "2",
            "cidr": "192.168.1.100/24"
          }
        ],
        "maintenanceWindow": {
          "time": "16:30:59",
          "dayOfTheWeek": "Monday"
        }
      }
    }
    {
      "type": "collection",
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "items": [
        {
          "type": "cluster",
          "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
          "metadata": {
            "createdDate": "2020-12-10T13:37:50+01:00",
            "createdBy": "[email protected]",
            "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
            "lastModifiedDate": "2020-12-11T13:37:50+01:00",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
            "state": "AVAILABLE"
          },
          "properties": {
            "displayName": "MariaDB cluster",
            "mariadbVersion": "10.6",
            "dnsName": "ma-yourcluster.mariadb.region.ionos.com",
            "instances": 2,
            "ram": 2,
            "cores": 4,
            "storageSize": 10,
            "connections": [
              {
                "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
                "lanId": "2",
                "cidr": "192.168.1.100/24"
              }
            ],
            "maintenanceWindow": {
              "time": "16:30:59",
              "dayOfTheWeek": "Monday"
            }
          }
        }
      ],
      "offset": 200,
      "limit": 100,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  • AVAILABLE: When the cluster is available and healthy.

  • RESTORING: When the cluster is being restored.

  • DESTROYING: When the cluster is being deleted.

  • FAILED: An error occurred.

  • LOCATION: Displays the location where the MariaDB cluster is located.

  • INSTANCES: Displays the number of nodes.

  • VERSION: The version is set to 10.6 by default.

  • OPTIONS: Select to perform the following:

    • Details: Select to view the details of the respective cluster.

    • Delete: Select to delete the corresponding cluster. In the dialog box that appears, select Delete to confirm deletion. For more information, see Delete a MariaDB Cluster.

  • Displays the stipulated day of the week and the time scheduled for the maintenance window.
  • Point In Time Recovery: Displays the earliest backup available for restoration. For more information, see Restore a MariaDB Cluster from a Backup.

  • Delete cluster: Select to delete the respective cluster. For more information, see Delete a MariaDB Cluster.

  • details
    List of MariaDB clusters
    Details option
    MariaDB cluster details
    Endpoints

    A regional endpoint is necessary to interact with the MariaDB REST API endpoints. For more information, see the API specification file.

    IONOS supports the following endpoints for various locations:

    • Berlin, Germany: https://mariadb.de-txl.ionos.com/clusters.

    • Frankfurt, Germany: https://mariadb.de-fra.ionos.com/clusters

    • Logroño, Spain: https://mariadb.es-vit.ionos.com/clusters

    • London, United Kingdom: https://mariadb.gb-lhr.ionos.com/clusters

    • Worcester, United Kingdom: https://mariadb.gb-bhx.ionos.com/clusters

    • Newark, United States: https://mariadb.us-ewr.ionos.com/clusters

    • Las Vegas, United States: https://mariadb.us-las.ionos.com/clusters

    • Lenexa, United States: https://mariadb.us-mci.ionos.com/clusters

    • Paris, France: https://mariadb.fr-par.ionos.com/clusters

    Request parameter headers

    To make authenticated requests to the API, the following fields are mandatory in the request headers:

    Header
    Required
    Type
    Description

    Authorization

    yes

    string

    HTTP Basic authorization. A base64 encoded string of a username and password separated by a colon. [email protected]:password

    X-Contract-Number

    no

    integer

    Users with more than one contract may apply this header to indicate the applicable contract.

    Content-Type

    yes

    string

    Examples

    The documentation contains curl examples, as the tool is available on Windows 10, Linux, and macOS. You can also refer to the following blog posts on the IONOS website that describe how to execute curl in Linux and Windows systems if you encounter any problems.

    Prerequisites

    A list of prerequisites to assure success with MariaDB creation.

    Create a MariaDB Cluster

    Learn to create a MariaDB cluster.

    Verify the status of a MariaDB Cluster

    Learn to verify the status of a MariaDB cluster.

    Connect from Kubernetes

    Learn how to connect to MariaDB from your managed Kubernetes cluster.

    List MariaDB Clusters

    Learn how to list the MariaDB clusters.

    Fetch a MariaDB Cluster

    Learn how to fetch a specific MariaDB cluster.

    Delete a MariaDB Cluster

    Learn how to delete a specific MariaDB cluster.

    List MariaDB Cluster Backups

    Learn how to retrieve a list of backups for all MariaDB clusters.

    Fetch a specific Backup of a MariaDB Cluster

    Learn how to retrieve a specific backup of a MariaDB cluster.

    Retrieve all Backups of a MariaDB Cluster

    Learn how to retrieve all backups of a specific MariaDB cluster.

    Create a MariaDB Cluster from a Backup

    Learn how to create a MariaDB cluster from an existing backup.

    Restore a MariaDB Cluster from a Backup

    Learn how to restore a MariaDB cluster from a backup.

    View the list of MariaDB Clusters
    Select the respective MariaDB cluster from the list
    Point in time recovery option
    Select a date
    Confirm restoration
    Restoration is in progress

    User Privileges

    When you use MariaDB with IONOS DBaaS, the initial user is given a full set of administrative permissions. These privileges allow the user to create, manage, and control the database.

    Privilege
    Description

    Create a MariaDB Cluster from a Backup

    The request creates a new MariaDB cluster, which involves restoring a backup of an existing MariaDB cluster and configuring it to function as a new cluster. Ensure you have a backup of your MariaDB cluster containing all the necessary data and configuration files for appropriate functioning.

    Prerequisite

    • Only contract administrators, owners, and users with Access and manage DBaaS privilege can create and manage MariaDB clusters. Ensure that you have the necessary privilege.

    Set this to application/json.

    1. In the DCD, go to Menu > Databases > MariaDB.

    1. In the DCD, go to Menu > Databases > MariaDB.

    1. In the DCD, go to Menu > Databases > MariaDB.

    Create stored programs using the CREATE PROCEDURE or CREATE FUNCTION statements.

    CREATE TEMPORARY TABLES

    Create temporary tables with the CREATE TEMPORARY TABLE statement. This privilege enables writing and dropping those temporary tables.

    CREATE USER

    Create new database users.

    CREATE VIEW

    Create a view using the CREATE VIEW statement.

    DELETE

    Remove rows from a table using the DELETE statement.

    DELETE HISTORY

    Remove historical rows from a table using the DELETE HISTORY statement.

    DROP

    Delete databases, tables, or views using the DROP DATABASE, DROP TABLE, or DROP VIEW statements.

    EXECUTE

    Execute a stored procedure using the CALL statement.

    INDEX

    Create an index on a table using the CREATE INDEX statement.

    INSERT

    Add new rows to a table using the INSERT statement.

    LOCK TABLES

    Lock tables for controlled read/write access using the LOCK TABLES statement.

    PROCESS

    View and control current server processes.

    REFERENCES

    Currently unused.

    SELECT

    Read data from tables using the SELECT statement.

    SET USER

    Switch to a different user session.

    SHOW DATABASES

    Display a list of all databases on the server.

    SHOW VIEW

    Show the CREATE VIEW statement to create a view using the SHOW CREATE VIEW statement.

    SLAVE MONITOR

    Monitor database replication processes (for replica servers).

    TRIGGER

    Create, delete, or display database triggers using the CREATE TRIGGER, DROP TRIGGER, or SHOW CREATE TRIGGER statements.

    UPDATE

    Modify existing rows in a table using the UPDATE statement.


    These privileges give the initial user full control over the database. They also come with the GRANT OPTION, which allows the user to assign these permissions to others, helping manage access safely and efficiently.

    For more information, refer to the MariaDB Documentation.

    ALTER

    Modify the structure of a table using the ALTER TABLE statement.

    ALTER ROUTINE

    Change the characteristics of a stored procedure or function using the ALTER PROCEDURE or ALTER FUNCTION statements.

    CONNECTION ADMIN

    Manage database connections, such as disconnecting users.

    CREATE

    Create databases using the CREATE DATABASE statement.

    CREATE ROUTINE

    Request

    Note:

    • After creating a database, you can access it via the corresponding LAN using the same username and password specified during creation.

    • This is the only opportunity to set the username and password via the API. The API does not provide a way to change the credentials yet. However, you can change them later using raw SQL.

    • The data center must be provided as a UUID. The easiest way to retrieve the UUID is through the .

    • The sample UUID in the example is 498ae72f-411f-11eb-9d07-046c59cc737e.

    Response

    Your values will differ from those in the sample code. It may contain different IDs, timestamps etc.

    The created cluster is returned with metadata.state set to BUSY, which indicates that the cluster is not yet reachable. This is because the cloud will create a completely new cluster and needs to provision new nodes for all the requested replicas.

    200 Successful operation

    After creation, remember to validate the status of your MariaDB cluster. For more information, see Verify the Status of a MariaDB Cluster.

    Set Up a MariaDB Cluster

    Prerequisites

    • Before setting up a database, ensure that you are working within a provisioned that contains at least one VM from which to access the database. The VM you create is counted against the quota allocated in your contract.

    • Database Manager is available only for contract administrators, owners, and users with

    curl -X 'POST' \
      'https://mariadb.de-txl.ionos.com/clusters' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
    {
      "properties": {
        "mariadbVersion": "10.6",
        "instances": 3,
        "cores": 4,
        "ram": 4,
        "storageSize": 10,
        "connections": [
          {
            "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
            "lanId": "2",
            "cidr": "192.168.1.100/24"
          }
        ],
        "displayName": "MariaDB cluster",
        "maintenanceWindow": {
          "time": "16:30:59",
          "dayOfTheWeek": "Monday"
        },
        "credentials": {
          "username": "cluster_admin",
          "password": "my-t0p-secret-password"
        },
        "fromBackup": {
          "backupId": "498ae72f-411f-11eb-9d07-046c59cc737e",
          "recoveryTargetTime": "2020-12-10T13:37:50+01:00"
        }
      }
    }'
    {
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "metadata": {
        "createdDate": "2020-12-10T13:37:50+01:00",
        "createdBy": "[email protected]",
        "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedDate": "2020-12-11T13:37:50+01:00",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "state": "AVAILABLE"
      },
      "properties": {
        "displayName": "MariaDB cluster",
        "mariadbVersion": "10.6",
        "dnsName": "ma-yourcluster.mariadb.region.ionos.com",
        "instances": 3,
        "ram": 4,
        "cores": 4,
        "storageSize": 10,
        "connections": [
          {
            "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
            "lanId": "2",
            "cidr": "192.168.1.100/24"
          }
        ],
        "maintenanceWindow": {
          "time": "16:30:59",
          "dayOfTheWeek": "Monday"
        }
      }
    }
    Cloud API
    Access and manage DBaaS
    privileges. You can set the privilege via the DCD group privileges. For more information, see
    .

    Create a Cluster

    To create a MariaDB cluster, follow these steps:

    2. Click Create cluster to create a new MariaDB cluster.

    3. Enter the following details in the Create cluster window:

    • Define cluster properties

    • Select the required number of resources

    • Connect the data center with the MariaDB cluster

    • Schedule the MariaDB cluster maintenance

    Result: The Estimated costs will be displayed based on the input. It is exclusive and certain variables like traffic and backup are not considered.

    Estimated costs

    4. Click Save to create the MariaDB cluster.

    Result: Your MariaDB Cluster is now created. The STATE is set to CREATING when the operation is in progress.

    MariaDB cluster is being created

    Define Cluster properties

    To define cluster properties, specify the following:

    1. Cluster Name: Enter an appropriate name for your MariaDB cluster.

    2. Cluster Version: Select a version of MariaDB from the drop-down list. IONOS only supports Long-Term Support (LTS) versions, starting from MariaDB 10.6.

    3. Instances: Enter the number of MariaDB nodes you want in the cluster. One MariaDB node always manages the data of exactly one database cluster. You can also use the arrows to increase or decrease the number of nodes. Replication is possible only when you define more than one node.

    Note: Here, you will have a primary node and one or more standby nodes that run a copy of the active database, so you have n-1 standby nodes in the cluster.

    1. Location: Select a location of your preference from the drop-down list.

    2. Replication Type: The replication type is Asynchronous by default for MariaDB. You will see this option only upon selecting more than one node (instance). In an asynchronous mode, the primary MariaDB node does not wait for a replica to indicate that the data has been written. The cluster can lose some committed transactions to ensure availability.

    3. CPU Type: The CPU type is set to Dedicated Core, by default.

    Define cluster properties

    Select the required number of resources

    To select the number of resources that you want to associate with the MariaDB cluster, specify the following:

    1. Number of CPUs (per instance): Increase or decrease the number of CPUs using the slider.

    2. RAM Size (per instance): Increase or decrease the size of the RAM using the slider to suit your needs.

    3. Storage Type: Currently, IONOS supports only SSD Premium, which is selected by default.

    4. Storage Size: Enter the storage size, in Gigabytes (GB), either manually or use the arrows to increase or decrease the storage size accordingly based on your needs.

    Associate the required number of resources

    Connect the Data Center with the MariaDB Cluster

    1. Datacenter: Select a data center from the drop-down list to associate it with the MariaDB cluster. The available data centers in the drop-down list vary according to the chosen Location. For more information, see Define cluster properties.

    2. Datacenter LAN: Select a LAN from the drop-down list for the data center.

    3. IP/Subnet: Enter the private IP or subnet using the available Private IPs.

    Note: To know your private IP address/Subnet, you need to:

    • Create a single server connected to an empty private LAN and check the IP assigned to the respective NIC in the selected LAN. The DHCP in that LAN always uses a /24 subnet, so you must reuse the first 3 octets to reach your database.

    • To prevent a collision with the DHCP IP range, it is recommended to use IP addresses ending between x.x.x.3/24 and x.x.x.10/24 (which are never assigned by DHCP).

    • If you have disabled DHCP on your private LAN, you must discover the IP address on your own.

    Connect the data center to the MariaDB cluster

    Schedule the MariaDB Cluster maintenance

    The selection of Mainatenance period is optional. Your chosen start time (UTC) plus four hours is the maintenance time.

    1. Day: Select a day from the drop-down list to set a day for maintenance.

    2. Start Time (UTC): Enter a time using the pre-defined format (hh:mm:ss) to schedule the maintenance task. You can also click the icon to set a time.

    Note: We recommend choosing the day and time appropriately because the maintenance occurs in a 4-hour-long window.

    Schedule maintenance

    Define Users

    The credentials of any user who has previously been created in the backup will be overwritten.

    1. Username: Enter a username to provide access to the MariaDB cluster for the respective user.

    2. Password: Enter a password for the respective user.

    Define user
    Virtual Data Center (VDC)
    Manage User Access

    1. In the DCD, go to Menu > Databases > MariaDB.

    DCD How-Tos

    Learn how to use MariaDB in the DCD. This section provides step-by-step guides to help you effectively manage your MariaDB instances within the DCD.

    Quick Links

    List MariaDB Cluster Backups

    You can retrieve a list of backups for all MariaDB clusters in your contract. You can specify an integer for limit to return the maximum number of elements and define the pagination using offset.

    Request

    Set Up a MariaDB Cluster

    Learn how to set up a MariaDB cluster.

    View the list of MariaDB Clusters

    Learn how to view the list of MariaDB clusters.

    Restore a MariaDB Cluster from a Backup

    Learn how to restore a MariaDB cluster from its backup.

    Delete a MariaDB Cluster

    Learn how to delete a MariaDB cluster.

    Define users
    Response

    200 Successful operation

    curl -X 'GET' \
      'https://mariadb.de-txl.ionos.com/backups?limit=100&offset=200' \
      -H 'accept: application/json'
    {
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "items": [
        {
          "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
          "properties": {
            "clusterId": "498ae72f-411f-11eb-9d07-046c59cc737e",
            "earliestRecoveryTargetTime": "2021-10-23T01:21:10Z",
            "size": 2052,
            "baseBackups": [
              {
                "created": "2020-12-10T13:37:50+01:00",
                "size": 543
              }
            ]
          }
        }
      ],
      "offset": 200,
      "limit": 100,
      "total": 200,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }

    Create a MariaDB Cluster

    The request creates a new MariaDB cluster.

    Prerequisite

    • Only contract administrators, owners, and users with Access and manage DBaaS privilege can create and manage MariaDB clusters. Ensure that you have the necessary privilege.

    Request

    Note:

    • After creating a MariaDB cluster, you can access it via the corresponding LAN using the same username and password specified during creation.

    • This is the only opportunity to set the username and password via the API. The API does not provide a way to change the credentials yet. However, you can change them later using raw SQL.

    Response

    Your values will differ from those in the sample code. It may contain different IDs, timestamps etc.

    You may have noticed that the metadata.state is BUSY and that the database is not yet reachable. This is because the cloud will create a completely new cluster and needs to provision new nodes for all the requested replicas. This process runs asynchronously in the background and might take up to 30 minutes.

    200 Successful operation

    After creation, remember to validate the status of your MariaDB cluster. For more information, see .

    The data center must be provided as a UUID. The easiest way to retrieve the UUID is through the Cloud API.

  • The sample UUID is 498ae72f-411f-11eb-9d07-046c59cc737e.

  • Verify the Status of a MariaDB Cluster
    curl -X 'POST' \
      'https://mariadb.de-txl.ionos.com/clusters' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
      "properties": {
        "mariadbVersion": "10.6",
        "instances": 2,
        "cores": 4,
        "ram": 2,
        "storageSize": 10,
        "connections": [
          {
            "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
            "lanId": "2",
            "cidr": "192.168.1.100/24"
          }
        ],
        "displayName": "MariaDB cluster",
        "maintenanceWindow": {
          "time": "16:30:59",
          "dayOfTheWeek": "Monday"
        },
        "credentials": {
          "username": "db-admin",
          "password": "TopSecret!"
        }
      }
    }'
    {
      "type": "cluster",
      "id": "498ae72f-411f-11eb-9d07-046c59cc737e",
      "metadata": {
        "createdDate": "2020-12-10T13:37:50+01:00",
        "createdBy": "[email protected]",
        "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedDate": "2020-12-11T13:37:50+01:00",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "state": "BUSY"
      },
      "properties": {
        "displayName": "MariaDB cluster",
        "mariadbVersion": "10.6",
        "dnsName": "ma-yourcluster.mariadb.region.ionos.com",
        "instances": 2,
        "ram": 2,
        "cores": 4,
        "storageSize": 10,
        "connections": [
          {
            "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
            "lanId": "2",
            "cidr": "192.168.1.100/24"
          }
        ],
        "maintenanceWindow": {
          "time": "16:30:59",
          "dayOfTheWeek": "Monday"
        }
      }
    }