Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 9 - Install MariaDB

If you need a "MySQL" server for something like Wordpress, then you can just install MariaDB from the default repositories quickly and easily.

Native Packages

sudo apt update
sudo apt install mariadb-server -y

This will install MariaDB 10.1.37.

Login In As Root

MariaDB will now use the unix socket for authentication of the root account. It is best not to change this, and just log in with:

sudo mysql

Creating Sub Accounts

To give a website like wordpress access to the MySQL database, we will create a user account for them.

create database wordpress;
GRANT ALL ON `wordpress`.* to wordpress@localhost identified by 'passwordHere';

Using Repositories

@Todo.

References

Last updated: 26th May 2019
First published: 14th March 2019