Skip to content
This repository was archived by the owner on Jul 5, 2022. It is now read-only.

Latest commit

 

History

History
135 lines (99 loc) · 2.99 KB

File metadata and controls

135 lines (99 loc) · 2.99 KB

MariaDB (Mysql) Installation

TODO: More Mysql menagment commands!

If you want to get help regarding our products or just want to ask something, join our discord.

Linux Update

sudo apt update && sudo apt upgrade -y

Add the additionals packets

sudo apt-get install software-properties-common

Install mariadb-server

sudo apt install mariadb-server

Check the mariadb status

sudo systemctl status mariadb

Output The output should look like this!

image

Check the mysql version

mysql -v

Output The output should look like this!

image

MariaDB installation from repository (if normal installation not working)

Add the MariaDB GPK Key

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

Import key here

sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirrors.accretive-networks.net/mariadb/repo/10.3/ubuntu bionic main'

Linux Update

sudo apt update && sudo apt upgrade -y

Add the additionals packets

sudo apt-get install software-properties-common -y

install mariadb server

sudo apt install mariadb-server -y

Check the mariadb status

sudo systemctl status mariadb

Output The output should look like this!

image

Check the mysql version

mysql -v

Output The output should look like this!

image

A short tutorial on the base and management!

Securing MariaDB

sudo mysql_secure_installation

Connect to MariaDB

mysql -u root -p

Create a new MySQL database

CREATE DATABASE database_name;

Output The output should look like this!

image

list all MySQL Databases

SHOW DATABASES;

Delete MySQL database

DROP DATABASE database_name;

Output The output should look like this!

image

Creating new user

CREATE USER 'database_user'@'127.0.0.1' IDENTIFIED BY 'password_here';

Output The output should look like this!

image

List of all MySQL users

SELECT user, host FROM mysql.user;

Delete MySQL user

DROP USER 'database_user'@'localhost';