Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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, Great Britain: https://mariadb.gb-lhr.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
To make authenticated requests to the API, the following fields are mandatory in the request headers:
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.
The request creates a new MariaDB cluster.
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.
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.
The data center must be provided as a UUID
. The easiest way to retrieve the UUID
is through the .
The sample UUID
is 498ae72f-411f-11eb-9d07-046c59cc737e
.
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
Header | Required | Type | Description |
---|---|---|---|
After creation, remember to validate the status of your MariaDB cluster. For more information, see .
A list of prerequisites to assure success with MariaDB creation.
Learn to create a MariaDB cluster.
Learn to verify the status of a MariaDB cluster.
Learn how to connect to MariaDB from your managed Kubernetes cluster.
Learn how to list the MariaDB clusters.
Learn how to fetch a specific MariaDB cluster.
Learn how to delete a specific MariaDB cluster.
Learn how to retrieve a list of backups for all MariaDB clusters.
Learn how to retrieve a specific backup of a MariaDB cluster.
Learn how to retrieve all backups of a specific MariaDB cluster.
Learn how to create a MariaDB cluster from an existing backup.
Learn how to restore a MariaDB cluster from a backup.
Authorization
yes
string
HTTP Basic authorization. A base64 encoded string of a username and password separated by a colon. username@domain.tld: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
Set this to application/json
.
This topic describes connecting to MariaDB from your managed Kubernetes cluster.
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
.
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:
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.
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:
Create the pod: kubectl apply -f pod.yaml
Attach the pod and test connectivity:
Result: The database starts accepting connections.
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.
202 Successful operation
Follow the network specifications and resource considerations listed on this page to successfully set up a MariaDB cluster.
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.
CPU, RAM, storage, and number of database clusters are counted against quotas. For more information, see Resource allocation.
Database performance depends on the storage type. Currently, IONOS supports only SSD Premium storage type, by default.
The binary log files 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.
All database clusters are backed up automatically. For more information, see Automatic backups.
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:
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 POST
request:
You can use the following command to set the environment:
Alternatively, you can use the following commands to connect to the database:
Description | Command |
---|---|
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 MariaDB Documentation.
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 MariaDB Documentation.
Result: You now have a ready-to-use 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.
Note: Remember to update your UUID
. The sample UUID
in the example is 498ae72f-411f-11eb-9d07-046c59cc737e
.
202 Successful operation
The request restores a MariaDB cluster from a backup.
The backup must:
belong to the MariaDB cluster to be restored.
be in the AVAILABLE
state.
Info: The sample UUID
in the example is 498ae72f-411f-11eb-9d07-046c59cc737e
.
You will receive a 202 Successful operation when the request is complete.
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
.
Note: Remember to replace the backupId
with a valid ID
.
200 Successful operation
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.
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.
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
.
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
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
.
To query a single cluster, you need the id
from your create
response.
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.
202 Successful operation
After creation, remember to validate the status of your MariaDB cluster. For more information, see .
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}"