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.

Prerequisites

You must set up the following first.

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

ssh alex@bluedroplet.yourdomain.com

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

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

sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.sax.uk.as61049.net/mariadb/repo/10.1/ubuntu 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.

Comments

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 Set Up NodeJs And Npm On Linux

How To Set Up PHP on Ubuntu

How To Set Up A Vue Web App Development Environment

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

How To Set Up WordPress On Google App Engine (GAE)

What Is Markdown ?

How To Set Up A WordPress Website On Ubuntu