--- title: "Using MariaDB " slug: "database-database-7-1" tags: ["maria DB", "maria"] updated: 2026-09-17T09:25:07Z published: 2026-09-17T09:25:07Z canonical: "guide.ncloud-docs.com/database-database-7-1" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Using MariaDB Available in Classic and VPC ## About MariaDB Installer This page describes the concept and basic structure of NAVER CLOUD MariaDB Installer. "MariaDB" uses an open source relational database (RDBMS) called MariaDB, which is based on the same source code as MySQL. ### MariaDB MariaDB is a relational database that is widely used in the world created by MySQL developers. MariaDB provides a storage engine, plug-in, and many other tools. It has a fast and expandable structure so as to be used for various purposes. ### NAVER Cloud Platform MariaDB Installer configuration #### Installer service MariaDB Installer supported by NAVER Cloud Platform provides an environment file that offers a smooth operation standard for DB installation. In this regard, **we do not provide additional technical support other than DB installation**. #### RPM/APT For MariaDB installation, there are Source Compile / RPM,APT installation / Binary method. NAVER Cloud Platform provides RPM (APT) installation image, which is Normal Install method. The .repo file used by RPM(APT) installs MariaDB using the files officially provided by MariaDB, and it is included in the server image based on the latest version provided by Repo. #### RPM Install This is the package installed by RPM for CentOS 7.x with MariaDB. #### APT Install This is the package installed by APT for Ubuntu 16.X with MariaDB. #### Recommanded Parameters Recommended Parameter standardized in MariaDB installer image within NAVER Cloud Platform consists of the following: - innodb_file_per_table - innodb_log_file_size = 512M - innodb_log_files_in_group = 2 - default_storage_engine=InnoDB - query_cache_type = ON - query_cache_size = 0M - sysdate-is-now **innodb_file_per_table** When used as a tablespace, the physical size will not be reduced when the table is dropped. Therefore, when deleting a table, the option is used to secure the physical size. **innodb_log_file_size / innodb_log_files_in_group** Increase the innodb_log_file_size option to prevent a bottleneck phenomenon for CheckPoint under heavy traffic. DB Restart is required to adjust these variables. **default_storage_engine** Specify a standard with InnoDB that can use Online-DDL and Transaction. **query_cache_type / query_cache_size** Set ON / 0 to allow a user to dynamically turn ON/OFF query_cache after DB activation. Then adjust it to suit your service situation. **sysdate-is-now** In case of using sysdate, the time type data may vary if the data processing time between Master and Slave is different in Replication configuration. Therefore, for sysdate, it will automatically replace the now. ## MariaDB Installer management This section describes the management methods related to MariaDB Installer. ### Create MariaDB image server If you create an instance server with MariaDB installed, MariaDB Daemon with my.cnf environment standardized in NAVER Cloud Platform will be created and started up, and will be provided after Daemon activation is completed. #### my.cnf Parameter description of my.cnf is as follows: | Property | Description | | --- | --- | | expire_logs_days = 7 | To prevent a log size set by a log-bin from increasing, save it for 7 days. | | innodb_file_per_table | When used as a tablespace, the physical size will not be reduced when the table is dropped. Therefore, when deleting a table, the option is used to secure the physical size. | | innodb_log_file_size | Increase the innodb_log_file_size option to prevent a bottleneck phenomenon for CheckPoint under heavy traffic. DB Restart is required to adjust the variables. | | innodb_log_files_in_group | Specify the number of innodb_log_files. Two or more are recommended for Rotation. | | default_storage_engine | Specify a standard with InnoDB that can use Online-DDL and Transaction. | | query_cache_type query_cache_size | Set ON / 0 to allow a user to dynamically turn ON/OFF query_cache after DB activation. Then adjust it to suit your service situation. | | sysdate-is-now | In case of using sysdate, the time type data may vary if the data processing time between Master and Slave is different in Replication configuration. Therefore, for sysdate, it will automatically replace the now. | The directory where MariaDB is installed is as follows. | Property | Description | | --- | --- | | DATADIR | /var/lib/mysql/ | | SLOW_LOG | /var/lib/mysql/*slow.log | | my.cnf | /etc/my.cnf - CentOS /etc/mysql/my.cnf - Ubuntu. | - An error log for MariaDB is provided as the default, empty. If you need to configure it, you can add the following in my.cnf and restart your MariaDB daemon. log_error=mysqld.err ## Server creation procedure The process of creating MariaDB server is as follows. ### Connect to www.ncloud.com and log in ![database-7-1-101_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-101_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① Click **Console** at the top right to connect to the nCloud Console. ![database-7-1-102_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-102_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ② On the nCloud Console screen, click **[Create server]**. ## Create server ### Step 1. Select server image ![database-7-1-103_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-103_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① Select the MariaDB version that corresponds to your OS version and click **[Next]** at the bottom. ### Step 2. Set server ![database-7-1-104_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-104_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① Select a server type and the desired pricing plan. ### Step 3. Set authentication key ![database-7-1-105_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-105_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① Select **Use an existing authentication key**. ### Step 4. Set firewall ![database-7-1-106_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-106_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① Select **Select an existing ACG** or create a new one. ### Step 5. Confirm ![database-7-1-107_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-107_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① Confirm your settings and create a server with MariaDB installed. ## Set server connection and confirm ### Set port forwarding ![database-7-1-108_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-108_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① After the server creation, click **[Set port forwarding]** at the top. ![database-7-1-109_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-109_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① Register an **external port** for SSH connection in the **Set port forwarding** screen. ② Register the external port and click **[Add]**. ![database-7-1-110_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-110_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ③ Click **[Apply]**. ### Get admin password ![database-7-1-111_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-111_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ① After setting the port forwarding, click **[Manage servers]** at the top. ② Click **Get admin password**. ![database-7-1-112_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-112_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ③ In the **Get admin password** window, attach your authentication key file. ④ Click **[Get admin password]**. ![database-7-1-113_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-7-1-113_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) ⑤ Remember the password on the next screen. ### Connect to server using terminal Use a terminal program to access as follows. - PORT: Port number set by a port forwarding - Public IP: Public IP for server connection displayed on the port forwarding screen - Password: Password shown as the administrator's password. Note that the initial password must be changed. ``` ssh -p [PORT] root@[Public IP] ``` ### After creating a server image 1. If you do not immediately use the server image after creation, **ShutDown MariaDB Daemon** is recommended in order to prevent security threats. 2. **You must set a password** because PostgreSQL does not provide an initial password. ### Run or stop MariaDB - To run or stop MariaDB Daemon, use the following commands. ``` shell> /sbin/service mysqld start shell> /sbin/service mysqld stop ``` ``` Shell> /usr/sbin/service mysql start Shell> /usr/sbin/service mysql stop ``` - CentOS - Ubuntu - To check whether MariaDB Daemon is running, use the following command. ``` Shell> ps -ef | grep mysqld ``` - Result ) MySQLd / mysqld process has to be shown. - MySQL created by NAVER Cloud Platform is accessible by the following command. ``` Shell> mysql -uroot ``` - An initial password is not provided according to the MariaDB password policy. - You must change your password at your first login in order to prevent security threats. - Use the following command to change the root password. ``` mysql> set password=password('password'); ``` - The recommended basic policy for passwords is as follows. - At least 8 characters - At least 1 special character - At least 1 number - At least 1 case combination ### Terminate MariaDB image server We recommend following steps below when terminating a server where MariaDB is created on NAVER Cloud Platform. 1. Back up the data stored in MariaDB. - For backed up data, keep it a separate repository after downloads. 1. Stop MariaDB Daemon. 2. Delete the data directory where MariaDB is stored. - e.g.) rm ‐rf /var/lib/mysql 1. Click **Stop > Terminate** in the NAVER Cloud Platform Console. ### Enable external access If you use MariaDB on Ubuntu, you can only connect from localhost due to Default Parameter. In order to enable an external access, we will guide you through the following example. 1. Connect to MariaDB DB. 2. Grant an account permission. e.g.) GRANT ALL PRIVILEGES ON *.* to 'Account name'@'%' IDENTIFIED BY 'Password'; 3. Edit the environment file. e.g.) sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf 4. Comment out bind-address. ![database-1-115_en](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/database-1-115_en.png?sv=2026-02-06&spr=https&st=2026-10-27T20%3A39%3A50Z&se=2026-10-27T21%3A39%3A50Z&sr=c&sp=r&sig=e5trHUmFoSZG4ns9p6xUc9yfg5CmU%2Fl8KKxwz4Zfi8I%3D) 5. Restart MariaDB.