Cloud DB Serverless quickstart

Prev Next

Available in VPC

The Cloud DB Serverless service on NAVER Cloud Platform enables easy and fast deployment of DB clusters in a serverless cloud environment, automatically optimizing specifications and capacity. The detailed usage can be found in Cloud DB Serverless Usage, but it is recommended to first review the overall scenario of using the Cloud DB Serverless service. By learning the usage scenarios first and then reviewing the usage methods, you can make smoother use of the Cloud DB Serverless service. After that, you can create DB clusters in the NAVER Cloud Platform console and easily operate databases.

The overall procedure for using Cloud DB Serverless and the description of each step are as follows.

1. Create application server
2. Set access environment
3. Test application server connection
4. Create DB Clusters
5. Set ACG
6. Test DB Cluster connection

1. Create application server

First, create an application server that will communicate with DB Cluster to be created from Cloud DB Serverless on NAVER Cloud Platform console. The application server can be created from the VPC environment of the NAVER Cloud Platform console i_menu > Services > Compute > Server.
You can refer to the following user guides:

Note

In this section, we will briefly introduce how to create an application server. For more information on full creation methods, see the following guides:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Compute > Server.
  2. Click [Create server].
  3. Select the server image and click [Next].
  4. Enter the required information, and then click [Next].
  5. If you do not have an existing authentication key, then create a new authentication key and click [Next].
  6. If you do not have any ACG, create a new one.
  7. After the final confirmation, click [Create server].
Caution

The ACG name of the application server from step 7 is used when adding ACG to the MySQL Server later on.

2. Set access environment

To set up a server access environment in the VPC environment of the NAVER Cloud Platform console, you need to set up a public IP.

Note

In this section, we will briefly introduce how to set up the access environment. For more information on setting up the access environment, see the following guide:

3. Test application server connection

Once you complete setting up the access environment, use the terminal program to test if you can connect to the application server properly.

To test connectivity to the application server using the PuTTY terminal program:

  1. Run PuTTY.
  2. Enter the IP address and port number acquired from the access environment settings for Host Name (or IP address) and Port.
    clouddbformysql-start_01
  3. Click [Open].
  4. When the PuTTY Security Alert popup window appears, click [Accept].
    clouddbformysql-start_02
  5. When the cmd window for server access appears, enter the password you got from Get admin password.
    clouddbformysql-start_03
Note

You can change the password through the passwd commands.

4. Create DB Clusters

After you complete testing the application server connection, create DB Cluster that will communicate with the application server. The DB Cluster can be created from the Services > Database > Cloud DB Serverless menu on the NAVER Cloud Platform console without a separate service subscription request.
You can refer to the following user guides:

5. Set ACG

To set up Access Control Group (ACG) for DB clusters of Cloud DB Serverless from NAVER Cloud Platform console:

Note

In this section, we will briefly introduce how to set up ACG. For more information on how to set ACG, see ACG user guides.

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to i_menu > Services > Database > Cloud DB Serverless .
  2. Click the ACG menu.
  3. Click and select the ACG to set up, and then click [Set ACG].
    • Select the ACG of the DB cluster automatically created
  4. Enter the ACG name of the application server in Access source.
  5. Enter the port number in Allowed port.
  6. Click the [Add] button.
  7. Click the [Apply] button.

6. Test DB Cluster connection

To test if you can connect properly to the created MySQL Client by installing the DB cluster:

  1. Access the application server, run the following commands, and install MySQL.

    • Rocky 8.x - 9.x version
    [root@localhost ~] # sudo dnf install -y mysql-server
    [root@localhost ~] # sudo systemctl start mysqld
    
  2. Access the DB cluster by executing the following commands.

    • You can check port number, user ID, and password required for DB access from the DB Cluster menu of the NAVER Cloud Platform console.
    [root@localhost ~] # mysql -h ① Private domain name -u ②user_id -p --port ③DB access port
    
    -- Access success examples
    
    [root@localhost ~] # mysql -h db-gmcp.beta-cdb.ntruss.com -umysql_dba -p --port 3306
    Enter password: **********
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 17199
    Server version: 5.7.19-log MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>