MariaDB Installation

MariaDB Installation and Usage on Linux (Debian/Ubuntu)

Techno Drishti

Technology & Innovation Team

A collective of developers, designers, and engineers building scalable digital solutions and sharing practical insights from the field.

1 min read 154 words
MariaDB Installation

MariaDB Installation and Usage on Linux (Debian/Ubuntu)

This document explains how to install, secure, and use MariaDB on Linux systems

  1. Install MariaDB

sudo apt update && sudo apt upgrade -y
sudo apt install mariadb-server
  1. Start & Enable Service

sudo systemctl start mariadb sudo systemctl enable mariadb
  1. Secure MariaDB

sudo mysql secure_installation
  • Recommended answers: Yes to all security prompts.
  1. Login to MariaDB

sudo mysql
or
mysql -u root -p
  1. Check MariaDB Port

SHOW VARIABLES LIKE 'port';
Default: 3306
  1. Create Database & User

CREATE DATABASE mydb;

CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON mydb.\* TO 'myuser'@'localhost'; FLUSH PRIVILEGES;
  1. Basic Commands

SHOW DATABASES;
USE mydb;
SHOW TABLES;
  1. Configuration Files

/etc/mysql/mariadb.conf.d/50-server.cnf
  1. Restart MariaDB

sudo systemctl restart mariadb

About the Author

Techno Drishti

Technology & Innovation Team

A collective of developers, designers, and engineers building scalable digital solutions and sharing practical insights from the field.

Related Articles

Continue exploring topics you might find interesting

database

PostgreSQL 18 Installation & Setup Guide for Debian and Ubuntu

A production-ready, step-by-step guide to installing PostgreSQL 18 on Debian and Ubuntu using the official PostgreSQL APT repository. Covers secure installation, user and database setup, authentication configuration, and best practices for modern web applications.

Read Article
lms

Koha LMS Installation Guide on Linux (Debian/Ubuntu)

This document provides a **clear, step-by-step, production-oriented guide** to install **Koha Integrated Library Management System (LMS)** on a Linux server, specifically **Debian or Ubuntu**. Koha officially recommends Debian-based systems and this guide follows best practices used in real-world library deployments.

Read Article
devops

Gitea Setup on Debian/Ubuntu (LAN Access, PostgreSQL, Apache)

A step-by-step guide to setting up Gitea on Debian/Ubuntu with LAN access, PostgreSQL, and Apache.

Read Article

Enjoyed this article?

Get notified when I publish new content. No spam, just quality articles delivered to your inbox.