# Provisioning a MySQL service

You can create a MySQL database service using the Provisioning App in the Tessell Console. During provisioning, you can customize the configurations such as the service name, database engine version, cloud provider, region, compute shape, storage, high availability, security, monitoring, backups, and maintenance options.

***

### Prerequisites

A subscription must be created for your chosen cloud provider.

***

### To create a MySQL database using the Tessell Console:

1. Sign in to the Tessell Console and open the **Provisioning** App from the **DB Services** section in the left navigation pane.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FsKdO3Vpn0T4AV3TRu7uo%2Funknown.png?alt=media&#x26;token=f84024ba-e097-434d-8efb-f4797669ec61" alt="" width="375"><figcaption></figcaption></figure>

2. In the navigation pane, select **MySQL** as your database engine.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FqBaKK33rY1vFkcZmJYZ8%2Funknown.png?alt=media&#x26;token=70451ccd-a8f4-43d3-b757-60407b7534aa" alt=""><figcaption></figcaption></figure>

3. In the **Service Details** section, provide the following:
   1. **Service Name**: A unique name for your DB service.
   2. **Description (Optional)**: A brief description of the service.
   3. **Tags (Optional)**: Add tags to help organize or track your resources.
   4. **Software Release**: Select the major version from the dropdown and choose the minor version by clicking the **Edit** option in the **Version** section.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FgsDZQqWZCCrJEb2C1hbp%2Funknown.png?alt=media&#x26;token=6e78e718-2938-4e68-a886-fa80f039eed4" alt="" width="375"><figcaption></figcaption></figure>

4. In the **Cloud Provider Settings**, enter:
   1. **Subscription**: Select the subscription registered with the Tessell Platform.
   2. **Region**: Choose the desired cloud region.
   3. **VPC/VNet**: Select your VPC (for AWS) or VNet (for Azure).
   4. **Availability Zone**: Choose your preferred AZ.
   5. **Private Subnet**: Select a subnet from the dropdown list.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FEZtwZnsLlwEMAhZTwfDm%2Funknown.png?alt=media&#x26;token=db4f212a-cfe3-4c5f-9ad0-199e3f007704" alt="" width="375"><figcaption></figcaption></figure>

5. In the **Compute Shape** Settings:
   1. Choose compute shape between **High Performance** or **Standard** based on workload.
   2. Select the number of **vCPU** required.
   3. Choose the **Compute Shape** based on the selected vCPUs.
   4. Specify **Storage** (in GiB) for your MySQL data.
   5. To enable encryption at rest, check the **Enable Encryption at Rest** box. You can use the default encryption key from your cloud provider or specify a custom key.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FKtFQFwfAnaOo3m0WyJIV%2Funknown.png?alt=media&#x26;token=c0d88349-9f5f-4c74-a1bb-0f1913afc997" alt=""><figcaption></figcaption></figure>

6. In the **High Availability** Settings:
   1. Choose your deployment type: **Single-AZ** or **Multi-AZ**.
   2. For Multi-AZ, enable **High Availability** to provision one or two readable standby instances in different availability zones.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FBe6Fd4wd2ADFpBtyBD0R%2Funknown.png?alt=media&#x26;token=c39d3106-42b8-488f-9e19-27274892574c" alt=""><figcaption></figcaption></figure>

7. In the **Connectivity** Settings:
   1. **Port**: Specify the database port number.
   2. **SSL**: Enable SSL to encrypt the connection between your application and the database. For more information, see MySQL documentation [Encrypted Connections](https://dev.mysql.com/doc/refman/8.0/en/encrypted-connections.html).
   3. **Public Access**: Enable if you want to access the DB service over the internet.
   4. **IP Address**: Specify the IPs or CIDRs from which the database can be accessed.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FPDrcXlFGCSwxQaCInpJf%2Funknown.png?alt=media&#x26;token=cb6a0ea2-8aab-49d1-b89c-95c7e4b23e3e" alt=""><figcaption></figcaption></figure>

8. In the **Database Configuration** section:
   1. **Database Name**: Enter your database name.
   2. **Master Username**: Specify the admin username for your database.
   3. **Master Password**: Use a default or define a custom password.
   4. In **Advanced Configuration** Setting: Choose your DB parameter profile.

      Optionally, you can create a custom parameter profile if you prefer not to use the default profile.
   5. In **Custom Scripts**: \[Optional] provide:

      1. **Pre-Script**: Choose to configure the VM before initializing the database.
      2. **Post-Script**: Choose to configure the VM after the database is created.

      Optionally, you can upload Pre/Post Scripts in the **Script Library** app if you want to configure custom settings on the VM during provisioning.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FdcMXUp0s6T1fG09D9Ozk%2Funknown.png?alt=media&#x26;token=53509b6c-0488-4fbe-be53-8ae56c9cc876" alt=""><figcaption></figcaption></figure>

9. In the **Additional Settings** section:
   1. **Maintenance Window**: Define a weekly time window for applying any modifications or patches.
   2. **Auto Minor Version Upgrade**: Enable if you want automatic minor upgrades during the maintenance window.
   3. **Monitoring Insights**: You may enable Performance Insights (contact your infrastructure admin for access).
   4. **Availability Machine**: Configure your **RPO** (Recovery Point Objective) policy for data protection and set your preferred backup window.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2F1p5SSWjdnBmz1uAw4YK3%2Funknown.png?alt=media&#x26;token=3e678444-5464-471a-9418-16e13e702121" alt=""><figcaption></figcaption></figure>

10. Click **Create Service** to begin provisioning your MySQL database.
11. As an alternative method, use the code to provision a MySQL service:
    1. Use the **Code** button at the top-right corner to view the code in different languages like Shell, Python, Go, Java, Javascript, and PowerShell. You can also view the corresponding APIs.&#x20;
    2. You can copy or download the code using the respective buttons in the top-right corner.
    3. Use the **Close** button at the bottom-right corner to return back to the main window.
12. Navigate to the **My Services** console to monitor the provisioning status. Initially, the service shows as **Creating**, and after it is ready for use, the status updates to **Ready**.

<figure><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2FkGyxfJRSWku93TPnpr4V%2Funknown.png?alt=media&#x26;token=68d02fb9-6e2c-4173-9fcb-a28a2f441c59" alt=""><figcaption></figcaption></figure>

<br>
