• Home
  • Knowledgebase
  • Blog
  • Shared Hosting
    • Linux Shared Hosting
  • Server
    • Dedicated Server Hosting
    • Smart Dedicated Server
    • Linux Vps Server
    • Windows VPS Server
  • Cloud Server
    • Micro Azure Cloud
    • Amazon Web Services
    • Google Cloud
    • Cloud VPS Server
  • Security
    • SSL Certificate
  • Email
    • Office 365
    • Google Workspace
  • Home
  • Knowledgebase
  • Blog
  • Shared Hosting
    • Linux Shared Hosting
  • Server
    • Dedicated Server Hosting
    • Smart Dedicated Server
    • Linux Vps Server
    • Windows VPS Server
  • Cloud Server
    • Micro Azure Cloud
    • Amazon Web Services
    • Google Cloud
    • Cloud VPS Server
  • Security
    • SSL Certificate
  • Email
    • Office 365
    • Google Workspace
home/Knowledge Base/Debian/How to install MariaDB in Debian server

How to install MariaDB in Debian server

35 views 0 November 19, 2024 user1

Introduction :

MariaDB is an open-source relational database management system (RDBMS) that is a fork of MySQL.MariaDB is used as the database backend for many web applications, content management systems (CMS), and other data-driven software. It provides a reliable and efficient database solution for developers and system administrators.

To install MySQL on a Debian-based system, follow these steps:

Step 1:Update Your Package List

First, update the system package list to make sure your package index is up to date.

# sudo apt update

Step 2: Install MariaDB Server

To install MariaDB, run the following command:

# sudo apt install mariadb-server

This will install the MariaDB server package and the necessary dependencies.

Step 3: Start and Enable MariaDB Service

MariaDB should start automatically after installation, but you can check the service status and ensure it is running:

To check the status of the MariaDB service:

# sudo systemctl status mariadb

Step 4: Run the MariaDB Secure Installation Script

After installing MariaDB, it’s important to run the mysql_secure_installation script to configure the database securely. This will allow you to set a root password, remove insecure default settings, and configure other security features.

Run the following command:

# sudo mysql_secure_installation

You will be prompted with a series of questions:

  • Set a root password if you haven’t done so already.
  • Remove the test database (recommended).
  • Disallow remote root login (recommended).
  • Reload privilege tables to apply the changes

Step 5: Verify MariaDB Installation

To verify that MariaDB is working correctly, log in to the MariaDB shell as the root user:

# sudo mysql -u root -p

Enter the root password when prompted.

You should see the MariaDB prompt:

$ MariaDB [(none)]>

You can exit the MariaDB shell by typing:

# exit

Conclusion:

By following the installation steps, including securing the database and configuring essential settings, you can ensure that MariaDB is ready for use in production environments.

Was this helpful?

Yes  No
Related Articles
  • How To Install Node.js on Debian 8
  • How To Set Up a Firewall with UFW on Debian 9
  • How To Install Apache Tomcat 9 on Debian 9

Didn't find your answer? Contact Us

Leave A Comment Cancel reply

Debian
  • How to install MariaDB in Debian server
  • How To Install Apache Tomcat 9 on Debian 9
  • How To Set Up a Firewall with UFW on Debian 9
  • How To Install Node.js on Debian 8
All Categories
  • container
  • Ubuntu
  • Debian
  • Linux Basics
  • Almalinux
  • windows server
  • Centos

  How To Install Node.js on Debian 8

Support
  • Live chat
  • Knowledge Base
  • Blog
Manual Head Office
Toll free : 1800 572 8782
  • Copyright 2022 Hostzop Expert Solutions. All Rights Reserved.