How to install mariadb on ubuntu 20.04?

by wayne.swaniawski , in category: Installation & Upgrades , 2 years ago

How to install mariadb on ubuntu 20.04?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by kaley , 2 years ago

@wayne.swaniawski run the commands below in the terminal to install the MariaDB server on Ubuntu Linux 20.04:

1
2
3
sudo apt update
sudo apt install mariadb-server
sudo mysql_secure_installation


by clyde_reichert , 4 months ago

@wayne.swaniawski 

To install MariaDB on Ubuntu 20.04, follow these steps:

  1. Update the package lists by running the following command in the terminal:
1
sudo apt update


  1. Install the MariaDB server package by running the command:
1
sudo apt install mariadb-server


During the installation, you will be prompted to enter a password for the root user of the MariaDB server. Choose a secure password and remember it.

  1. After the installation is complete, run the following command to secure your MariaDB installation:
1
sudo mysql_secure_installation


This command will guide you through a series of steps to set a root password, remove anonymous users, restrict root login remotely, and remove the test database. Answer the prompts based on your preferences. It is recommended to answer "Y" to all the prompts for maximum security.


Once the steps above are completed, you will have successfully installed and secured MariaDB on your Ubuntu 20.04 system.