🔒 Closed How to install Mariadb in Ubuntu 20.0x

Status
Not open for further replies.

raevillena

Fanatic
1646266562743.webp1646266598734.webp

I sharing some snippets how to install MariaDB 10.5 in ubuntu 20.0x

1) open up a terminal inside ubuntu. or if you are in CLI already skip this step.
2) paste the code snippet below to install the Database engine.

#install mariadb 10.5 on ubuntu 20.0x
Code:
sudo apt -y install software-properties-common dirmngr
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.5/ubuntu focal main'
sudo apt update
sudo apt -y install mariadb-server mariadb-client

3) Setup the root user using
Code:
mysql_secure_installation
in the terminal. this is also the same code you can use whenever you forget the root password.
4) Login to engine using root user
Code:
mysql -u root -p
then key in the password
5) Once inside, Create a non root user for your apps
Code:
CREATE DATABASE testdb;
CREATE USER 'test'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON testdb.* TO test@localhost;
FLUSH PRIVILEGES;
quit
6) Login and use the database create to test the database engine.
Code:
mysql -u test -p
USE testdb;
7) Once testdb is in use. you are set. Done
 
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 700
    Views
  • 2
    Participants
Last reply from:
raevillena

Trending Topics

Online now

Members online
415
Guests online
4,982
Total visitors
5,397

Forum statistics

Threads
2,311,828
Posts
29,164,851
Members
1,186,909
Latest member
justintiiiime
Back
Top