- Click on the “Create new service” button on the top right as shown in the picture below.
- Select Your Service from the list of Aiven Service by clicking on the “MySQL” option as shown in the picture below.
-
Then select the suitable Service Cloud Provider , Service Cloud Region, Service Plan, and Disk Space. Then give your service a name. In the example we will be creating we will use the default suggestions, except the service plan, we will choose the "Hobbyist" plan.
-
Click on the "Create" button
Now, you will be redirected to your current services page, where you will find your list of Databases, including the one we just created!
The new Database will start building, and when it is ready it will show its status as "Running" in green as shown in the picture below.
Well, now we need to connect our database to the tool that we will be using to design it. There are many tools that we can use, in this example we'll be using MySQL Workbench.
If you would like to install MySQL Workbench, please click here and follow the installation steps!
- We first need to define the parameters by setting up a new connection, by clicking on the plus sign as shown in the picture below.
- Go to your database service on Aiven and copy the corresponding parameters' values into Workbench, and give a name to your Connection as shown in the pictures
- Download the "CA Certificate" and attach it to the "SSL CA File" under the SSL section in Workbench as in the picture below
-
Test your Database connection by clicking on the "Test Connection" button
-
When the connection is successful as in the picture shown below, click the "Ok" button
Now you are ready to start the fun part! 😎
-
Now, we will test our Database by creating a small example of 2 tables, adding some records, and then observe our Aiven application!
-
In this example, we will create a "Persons" table and "Cats" table from Workbench, as shown in the picture.
-
Then we created 1 instance of Persons and 2 instances of cats
- Next, you can check your Aiven service, you will find different views that show information about your database, for example, you can check the logs and the Query statistics as shown below
Now, you are ready to work with MyDQL on the Aiven platform!