Skip to main content
  1. Posts/

Create a database in MariaDB

·31 words·1 min
Table of Contents

Install #

sudo apt install mariadb-server
sudo mysql_secure_installation

Create database and user #

sudo mysql
create database my_database;
GRANT ALL PRIVILEGES ON my_database.* TO 'my_user'@'localhost' IDENTIFIED BY 'my_password' WITH GRANT OPTION;
flush privileges;