ToolJet can connect to both self-hosted and cloud-based MariaDB servers to read and write data.
<divstyle={{paddingTop:'24px'}}>
## Connection
To establish a connection with the MariaDB global datasource, you can either click on the **+ Add new global datasource** button located on the query panel or navigate to the **[Global Datasources](/docs/data-sources/overview)** page through the ToolJet dashboard.
**ToolJet requires the following connection details to connect to MariaDB:**
- **Host:** The hostname or IP address of the MariaDB server.
- **Username:** The username for the MariaDB account.
- **Password:** The password for the MariaDB account.
- **Connection Limit:** The maximum number of concurrent connections allowed to the MariaDB server.
- **Port:** The port number of the MariaDB server.
- **Database:** The name of the database that you want to connect to.
- **SSL:** Whether or not to use SSL to connect to the MariaDB server.
- **CA Certificate:** This option allows you to use a certificate issued by a Certificate Authority (CA). This is the most secure option, as it ensures that the identity of the MariaDB server has been verified by a trusted third party.
- **Self-Signed Certificate:** This option allows you to use a self-signed certificate. This is less secure than using a CA certificate, as it does not ensure the identity of the MariaDB server has been verified by a trusted third party. However, it is a good option if you do not have access to a CA certificate.
- **None:** This option does not use SSL. This is the least secure option, as it allows anyone to intercept your communications with the MariaDB server.
Once you have connected to the MariaDB datasource, follow these steps to write queries and interact with a MariaDB database from the ToolJet application:
1. Click the **+ Add** button to open the list of available datasources.
2. Select **MariaDB** from the global datasource section.
3. Enter the SQL query in the editor.
4. Click **Preview** to view the data returned from the query or click **Run** to execute the query.
:::tip
Query results can be transformed using Transformation. For more information on transformations, please refer to our documentation at **[link](/docs/tutorial/transformations)**.
Remember to adjust the values and conditions based on your specific needs. These commands will allow you to create the table, insert data, retrieve data, update data, and delete data in the _users_ table in MariaDB.
If you are still having trouble, please contact [ToolJet support](mailto:hello@tooljet.com) or ask on [slack](https://join.slack.com/t/tooljet/shared_invite/zt-2rk4w42t0-ZV_KJcWU9VL1BBEjnSHLCA) for assistance.