How To Set Up MariaDB on Ubuntu

MariaDB offers more features and speed improvements over MySQL. It’s also fully open source and has been adopted by a number of large companies.


You must set up the following first.

  • Domain name:
  • Hostname:
  • Username: alex
Setting Up MariaDB
  1. SSH into your server


  1. Install MariaDB
  • Add the repository containing the mainline version.

sudo apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8

sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] xenial main' -y
  • Update the package lists.

sudo apt-get update

  • Install the package.

sudo apt-get install mariadb-server -y

You’ll be prompted to enter a root password.

  1. Configure MariaDB/MySQL
  • Setup the default system tables.

sudo mysql_install_db

Note: If you get some error when running this command, check if there’s already a mysql process running (run command: ps -ef | grep mysqld). If so, there is no need to run mysql_install_db at all because it needs to be run only once, when you first install MySQL. Move on.

  • Secure the DB.

sudo mysql_secure_installation

A number of prompts will appear, you may reset the root password and you should accept the default values by hitting ENTER for other options.


Popular posts from this blog

How To Set Up Quasar v0.14 On A Laravel+Vue Framework

How To Set Up Quasar v0.13 On A Laravel(5.4)+Vue Framework

How To Fix Random Disappearing Of HTML Elements On iPhone/iPad