Quick Tips – Install MariaDB on Linux Mint 19.1

  • Go to the MariaDB site to obtain the installation details
https://downloads.mariadb.org/mariadb/repositories
  • You should able to retrieve commands similar to these
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.aarnet.edu.au/pub/MariaDB/repo/10.3/ubuntu bionic main'
sudo apt update
sudo apt install mariadb-server
  • To secure MariaDB from default settings
sudo mysql_secure_installation
  • To create a new database, start the MySQL client with root account for MariaDB
mysql -u root -p
  • Create a database called <djangoDb>
CREATE DATABASE djangoDb CHARACTER SET UTF8;
  • Create a user called <djangoUser>, replace password with your own
CREATE USER [email protected] IDENTIFIED BY 'password';
  • Grant all the right for <djangoUser> to access <djangoDb>
GRANT ALL PRIVILEGES ON djangoDb.* TO [email protected];
  • Apply all the changes to current session
FLUSH PRIVILEGES;
  • Exit MySQL client
exit