Products and Features
- Membuka Akses Ping pada IP Public VM Cloud Raya
- Maximize Your Storage Raya Access Speed with Content Delivery Network (CDN)
- How to Create Project Tag in Cloud Raya for More Organized VM Billing Report
- Exporting Cloud Raya VM to outer Cloud Raya's Infrastructure using Acronis Cyber Protect
- SSO Management on Cloud Raya
- Easy Steps to Enable VPC in Cloud Raya
- Using the SSH key Feature in Cloud Raya Dashboard
- Cloud Raya Load Balancer, Solution to Distribute Load Equally
- Create your own VPN server with DNS-Level AdBlocker using PiVPN & PiHole in CloudRaya
- Fix Broken LetsEncrypt SSL Certificate due to Expired Root CA Certificate
- Storage Raya - Cloud Raya S3 Object Storage
- How to Make a Snapshot and Configure VM Backup in Cloud Raya
- How to Request Services or Licenses Products
- Adding, Attaching, and Resize Root Storage Disk in Cloud Raya VPS
- Managing your DNS Zone with DNS Bucket in Cloud Raya
- Create VM, Custom Package, Reinstall VM, and Adjusting Security Profile
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Backing-Up Cloud Raya Windows VM Using Acronis Cyber Protect
- Load Balancing in Cloud Raya
- Establishing a VPN in Cloud Raya
- Generating an API Token
- Generating an API key
- Deploying a Virtual Machine in Cloud Raya
- Show Remaining Articles ( 9 ) Collapse Articles
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Maximize Your Storage Raya Access Speed with Content Delivery Network (CDN)
- Managing Storage Raya from various tools and from various OS
- Binding NextCloud with Cloud Raya S3 Object Storage as External Storage Mount
- Storage Raya - Cloud Raya S3 Object Storage
- Deploy Cpanel Menggunakan Ubuntu 20.04 di Cloudraya - Bagian 1
- Exporting Cloud Raya VM to outer Cloud Raya's Infrastructure using Acronis Cyber Protect
- Using the SSH key Feature in Cloud Raya Dashboard
- Adding, Attaching, and Resize Root Storage Disk in Cloud Raya VPS
- Create VM, Custom Package, Reinstall VM, and Adjusting Security Profile
- How to backup Linux VM via Acronis in Cloud Raya
- Backing-Up Cloud Raya Windows VM Using Acronis Cyber Protect
- Deploying a Virtual Machine in Cloud Raya
Integration
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Panduan Menggunakan SSH Key pada VM Cloud Raya dengan PuTTY
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Replatforming Apps to K8s with RKE and GitLab CI
- Integrasi API OpenAI: Completions dalam PHP
- Membangun Email Server di Cloud Raya Menggunakan iRedMail
- Meningkatkan Pengiriman Email dengan Sendinblue SMTP Relay
- Bangun Self Hosted Password Manager menggunakan Passbolt
- How to Install Podman on Almalinux/Rocky Linux 9
- ElkarBackup: GUI Based backup Tools based on Rsync and Rsnapshot
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Otomatisasi Task dengan Cronjob
- Upgrade Zimbra and the OS Version
- Deploy Mailu on Rancher Kubernetes
- Export dan Import Database di MySQL atau MariaDB Menggunakan Mysqldump
- Backup & Sync Local and Remote Directories Using RSYNC
- Managing Storage Raya from various tools and from various OS
- Binding NextCloud with Cloud Raya S3 Object Storage as External Storage Mount
- Simple monitoring and alerting with Monit on Ubuntu 22.04 LTS
- VS Code on your browser! How to install code-server on a VM
- Implementing Redis HA and Auto-Failover on Cloud Raya
- Using XFCE Desktop Environment on Cloud Raya VM
- Installing Python 3.7-3.9 on Ubuntu 22.04 Jammy LTS using PPA
- Implementing Continuous Integration with Gitlab CI and Continuous Delivery with Rancher Fleet
- Using Collabora Online on Cloud Raya NextCloud's VM
- Installing NextCloud in Cloud Raya- Detail Steps from the Beginning to the Very End
- Set Up High Availability PostgreSQL Cluster Using Patroni on Cloud Raya
- Set Up WAF KEMP in Cloud Raya Part 2
- Set Up WAF KEMP in Cloud Raya Part 1
- Using the SSH key Feature in Cloud Raya Dashboard
- Monitor Your Services Uptime Using Uptime Kuma
- Hosting Static Website with Hugo on Cloud Raya
- Kubernetes Ingress Controller using SSL in CloudRaya
- Reverse Proxy management using Nginx Proxy Manager
- Create your own VPN server with DNS-Level AdBlocker using PiVPN & PiHole in CloudRaya
- How to deploy Portainer on Linux to easily manage your docker containers
- High Availability Kubernetes Using RKE in Cloud Raya Part 3
- High Availability Kubernetes Using RKE in Cloud Raya Part 2
- High Availability Kubernetes Using RKE in Cloud Raya Part 1
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Deploying Magento on Cloud Raya
- How to Install Nextcloud on Cloud Raya
- How to Install CWP in Cloud Raya
- How to Install Node.js and Launch Your First Node App
- How to install and secure MariaDB on Ubuntu 18.04 and 20.04 on Cloud Raya
- How to Install and Securing MongoDB on Ubuntu 18.04 and 20.04
- Classes: Post Installation on Ansible
- Classes: Install and Configure Ansible
- Classes: Introduction to Ansible for a robust Configuration Management
- How to Setup Active Directory Domain Service & DNS with Cloud Raya
- How to Host Your Own Docker Hub in Cloud Raya
- How to Setup Your Own Laravel with Nginx in Ubuntu 18.04
- How to Deploy Container in Cloud Raya using Docker
- Securing CentOS with iptables
- Install and Configure Squid Proxy in Ubuntu
- Installing Apache and Tomcat: A Quick Way
- Securing Ubuntu with UFW
- Install a Node.js and Launch a Node App on Ubuntu 18.04
- Installing LAMP in Ubuntu
- Installing LEMP Stack on Ubuntu 18.04
- Show Remaining Articles ( 50 ) Collapse Articles
- Articles coming soon
- Deploy Cpanel Menggunakan Ubuntu 20.04 di Cloudraya - Bagian 1
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Panduan Menggunakan SSH Key pada VM Cloud Raya dengan PuTTY
- Membangun Email Server di Cloud Raya Menggunakan iRedMail
- Meningkatkan Pengiriman Email dengan Sendinblue SMTP Relay
- Bangun Self Hosted Password Manager menggunakan Passbolt
- ElkarBackup: GUI Based backup Tools based on Rsync and Rsnapshot
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Upgrade Zimbra and the OS Version
- Deploy Mailu on Rancher Kubernetes
- Managing Storage Raya from various tools and from various OS
- Binding NextCloud with Cloud Raya S3 Object Storage as External Storage Mount
- Simple monitoring and alerting with Monit on Ubuntu 22.04 LTS
- VS Code on your browser! How to install code-server on a VM
- Implementing Redis HA and Auto-Failover on Cloud Raya
- Using XFCE Desktop Environment on Cloud Raya VM
- Implementing Continuous Integration with Gitlab CI and Continuous Delivery with Rancher Fleet
- Using Collabora Online on Cloud Raya NextCloud's VM
- Installing NextCloud in Cloud Raya- Detail Steps from the Beginning to the Very End
- Set Up WAF KEMP in Cloud Raya Part 2
- Set Up WAF KEMP in Cloud Raya Part 1
- Monitor Your Services Uptime Using Uptime Kuma
- Create your own VPN server with DNS-Level AdBlocker using PiVPN & PiHole in CloudRaya
- How to deploy Portainer on Linux to easily manage your docker containers
- High Availability Kubernetes Using RKE in Cloud Raya Part 3
- High Availability Kubernetes Using RKE in Cloud Raya Part 2
- High Availability Kubernetes Using RKE in Cloud Raya Part 1
- How to Install Nextcloud on Cloud Raya
- Classes: Post Installation on Ansible
- Classes: Install and Configure Ansible
- Classes: Introduction to Ansible for a robust Configuration Management
- Connect Windows Active Directory on Cloud Raya with Azure AD
- How to Host Your Own Docker Hub in Cloud Raya
- How to Deploy Container in Cloud Raya using Docker
- Show Remaining Articles ( 23 ) Collapse Articles
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Integrasi API OpenAI untuk Membangun Chatbot Interaktif dalam Proyek PHP
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Integrasi API OpenAI: Completions dalam PHP
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Otomatisasi Task dengan Cronjob
- How to Deploy Django App on Cloud Raya VM Using Gunicorn, Supervisor, and Nginx
- How to Install Node.js and Launch Your First Node App
- How to Setup Your Own Laravel with Nginx in Ubuntu 18.04
- Install a Node.js and Launch a Node App on Ubuntu 18.04
- Panduan Menggunakan SSH Key pada VM Cloud Raya dengan PuTTY
- Bangun Self Hosted Password Manager menggunakan Passbolt
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Export dan Import Database di MySQL atau MariaDB Menggunakan Mysqldump
- Backup & Sync Local and Remote Directories Using RSYNC
- How to Deploy Django App on Cloud Raya VM Using Gunicorn, Supervisor, and Nginx
- Set Up WAF KEMP in Cloud Raya Part 2
- Set Up WAF KEMP in Cloud Raya Part 1
- Using the SSH key Feature in Cloud Raya Dashboard
- How to backup Linux VM via Acronis in Cloud Raya
- How to Backup Desktop Linux and Windows via Acronis in Cloud Raya
- Securing CentOS with iptables
- Securing Ubuntu with UFW
- Deploy Cpanel Menggunakan Ubuntu 20.04 di Cloudraya - Bagian 1
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Integrasi API OpenAI untuk Membangun Chatbot Interaktif dalam Proyek PHP
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Membangun Email Server di Cloud Raya Menggunakan iRedMail
- Bangun Self Hosted Password Manager menggunakan Passbolt
- Meningkatkan Kinerja Webserver dengan SSL Termination pada NGINX Load Balancer
- Menggunakan NGINX sebagai HTTP Load Balancer
- Installing Python 3.7-3.9 on Ubuntu 22.04 Jammy LTS using PPA
- Reverse Proxy management using Nginx Proxy Manager
- Install and Configure Squid Proxy in Ubuntu
- Installing Apache and Tomcat: A Quick Way
- Installing LAMP in Ubuntu
- Installing LEMP Stack on Ubuntu 18.04
- Show Remaining Articles ( 2 ) Collapse Articles
- Integrasi S3 Storage Raya dan Strapi untuk Pengoptimalan Penyimpanan Aset - Bag. 4
- Integrasi Konten Strapi ke dalam Frontend React - Bag. 3
- Mengelola Konten dalam Strapi Headless CMS - Bag. 2
- Menginstal Strapi Headless CMS di Cloud Raya - Bag. 1
- Integrasi API OpenAI untuk Membangun Chatbot Interaktif dalam Proyek PHP
- Menginstal Beberapa Versi PHP dalam Satu VM untuk Pengembangan Web yang Lebih Fleksibel
- Integrasi API OpenAI: Completions dalam PHP
- Hosting Static Website with Hugo on Cloud Raya
- Deploying Magento on Cloud Raya
- How to Install CWP in Cloud Raya
- How to Setup Active Directory Domain Service & DNS with Cloud Raya
How to install and secure MariaDB on Ubuntu 18.04 and 20.04 on Cloud Raya
In this article we are going to show you how to install and secure MariaDB on Ubuntu 18.04 and 20.04 on Cloud Raya, after previously talk about MongoDB.
Read also: How to Install and Secure MongoDB on Ubuntu 18.04 and 20.04
But, before that let’s define what MariaDB is. In short, MariaDB is an open-source, community-developed, forever free relational database management system (RDBMS) forked from MySQL. However, it is highly compatible with MySQL as it works as a drop-in replacement.
So, check the steps below to install and secure MariaDB 10.5 for Ubuntu 18.04 and Ubuntu 20.04 instances on Cloud Raya.
TLDR
For those who need a quick steps:
- Firstly, Enter commands below
- Secondly, Allow port 3306/TCP on the Security Profile to allow remote connections.
<code>sudo apt update && sudo apt install apt-transport-https -y
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
sudo apt install mariadb-server -y
sudo mysql_secure_installation
# For remote connection, otherwise ignore these lines
sudo sed -Ei 's/(bind-address *=).*/\1 INTERFACE-IP/' /etc/mysql/mariadb.conf.d/50-server.cnf
sudo systemctl restart mariadb
sudo ufw allow 3306/tcp</code>
How to Install MariaDB
MariaDB hasn’t been shipped to Ubuntu 18.04 / 20.04 official repository yet. So you will have to download it directly from https://mariadb.com. after that, you can either do:
- Download the binary packages, or
- Setup the repository via script
Hence, this tutorial will cover the second method.
Step 1. Install apt-transport-https
Firstly, the installer script needs apt-transport-https
package.
sudo apt update
sudo apt install apt-transport-https -y
Step 2. Pull the script and execute
You can download the script on
https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
and run it, but you can do it in one-liner like this instead:
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
A brief explanation about the
-LsS
flags oncurl
command:
–L
Curl will follow any redirects
–s
Silent all outputs
–S
If used together withs
, it will output error messages only on failure

Step 3. Install mariadb-server
You don’t have to update the repository as the script has done it for you. So, just proceed to install:
sudo apt install mariadb-server -y
Configuration
Step 4. Secure the installation
To secure the MariaDB installation, simply run:
sudo mysql_secure_installation
Then, answer every prompts with yes.

Step 5. Enable remote access
The default setting for a fresh MariaDB installation is to allow only local connections. So, you can verify it via the below syntax:
sudo ss -tulpn | grep mariadb

ss -tulpn
will list all listening ports/sockets.
–t
Display TCP sockets.
–u
Display UDP sockets.
–l
Display only listening sockets.
–p
Show process using socket.
–n
Do not try to resolve service names.
There, you will see that it listens to loopback IP (127.0.0.1) which means it will not accept remote connections.
If your plan is to build an app on the same server, then this is enough and you can ignore the rest of the steps. But, if this is not the case, you can keep going.
Then, Open /etc/mysql/mariadb.conf.d/50-server.conf
and find the line bind-address
. After that, change the IP address from 127.0.0.1
to your interface IP.
sudoedit /etc/mysql/mariadb.conf.d/50-server.conf
# find line 'bind-address = 127.0.0.1'
# change it to interface's IP

If you are not sure which IP to set, then you can check it by using the below command:
ip -4 -br a s

After you changed the bind-address, you need to restart the mariadb service.
sudo systemctl restart mariadb
# check the status
sudo systemctl status mariadb

Step 6. Allow port 3306/TCP on ufw
By default, both Ubuntu 18.04 and Ubuntu 20.04 are using ufw
. But first check if it’s active or not:
sudo ufw status

If it’s inactive, then skip this step. Otherwise, you need to allow mariadb (3306/tcp).
sudo ufw allow 3306/tcp
# or
sudo ufw allow mysql
Then, you should not forget to verify by using sudo ufw status

Step 7. Add Firewall Rule on the Security Profile on Cloud Raya
Lastly, add TCP port 3306 (MySQL default port) on the Security Profile to allow public remote connections.

All in all, that is how you install and secure MariaDB on Ubuntu 18.04 and 20.04. If you eager for more information, then you should check our previous article about how to install and secure MongoDB on Ubuntu.