Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How to install MariaDB?

Writer Olivia Zamora

What is the most stable/safest way to install MariaDB?

3

8 Answers

For Precise Pangolin 12.04 LTS

  1. Install the repo manager

    sudo apt-get install python-software-properties
  2. Import the GnuPG signing key

    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
  3. Modify your sources.list file to add MariadDB

    Open it from terminal (gksudo gedit /etc/apt/sources.list) and add the following lines at the end:

    • For Version 10:

      deb precise main
      deb-src precise main

      Or have the lines automatically added with:

      sudo add-apt-repository 'deb precise main' 
    • For Version 5.5:

      deb precise main
      deb-src precise main

      Or have the lines automatically added with:

      sudo add-apt-repository 'deb precise main'
  4. Refresh your system

    sudo apt-get update

  5. And finally install MariaDB

    sudo apt-get install mariadb-server

For further information see the their download page.

2

For 14.04 LTS and newer:

MariaDB 5.5 is included in 14.04, to install it you can do:

sudo apt-get install mariadb-server

An alternative would be to get it from MariaDB themselves by following these instructions.

1

For 13.04 Raring Ringtail / 13.10 Saucy Salamander

Install the certificates/keys:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db 

Then add the repository to the end of your /etc/apt/sources.list with:

sudo add-apt-repository "deb $(lsb_release -c -s) main"

And install the package:

sudo apt-get update
sudo apt-get install mariadb-server 

I have confirmed it on a local install.

4

For 12.10 Quantal Quetzal

Install the certificates/keys:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db 

Add the repository to the end of your /etc/apt/sources.list with:

sudo add-apt-repository 'deb quantal main' 

And install the package:

sudo apt-get update
sudo apt-get install mariadb-server 

If you want you can create a custom MariaDB sources.list file. Copy and paste the following into a file named MariaDB.list under /etc/apt/sources.list.d/ (it can also be added it to the bottom of /etc/apt/sources.list):

# MariaDB 5.5 repository list - created 2013-02-01 01:36 UTC
#
deb quantal main
deb-src quantal main 

(Re)Sources:

1

Ubuntu 14.04 LTS
If you have MySQL already setup, you should remove it.

These steps allow you to preserve your existing MySQL databases. Just follow the MariaDB installation screens carefully.

(Remove MySQL)
apt-get remove --purge mysql-server mysql-client mysql-common
apt-get autoremove
apt-get autoclean
*** The above steps also remove phpMyAdmin and MySQLI
(Install MariaDB and get phpMyAdmin and MySQLI back)
apt-get install mariadb-server mariadb-client libmariadbclient-dev libmariadbd-dev phpmyadmin

You might not require the dev packages. Reconfigure phpMyAdmin to use SSL only by editing /etc/phpmyadmin/apache.conf.

At this point, most things will be working, but I had problems with my Dovecot install. So I installed the following packages as well:

apt-get install dovecot-mysql *fixed mail receipt but sending is still blocked.
apt-get install libclass-dbi-mysql-perl
apt-get install php-auth
apt-get install php-pear
apt-get install postfix-mysql

The last 3 apt-get commands might not be necessary (since the libclass-dbi-mysql-perl package might install them), but on my Test server I needed to do them separately.

Everything on my LAMP server is now running nicely. If you have other software installed, you might need to test it to ensure you aren't missing any libraries they need.

At this moment, MariaDB does not have Oneiric repository, but only Natty (11.04):

As Oneiric is still in beta, you should wait for the final release, or try using the Natty repository.

4

To install MariaDB on your Ubuntu (Vivid) system open a terminal(Ctrl+Alt+T) and run:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb vivid main'

Once the key is imported and the repository added you can install MariaDB with:

sudo apt-get update
sudo apt-get install mariadb-server

Complete guide on installing MariaDB .deb files manually can be found here

Mariadb Official Source

In case someone bumps on the question, MariaDB website have the "How to"

For 15.04 version 10.1 of MariaDB you just do:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb vivid main'
sudo apt-get update
sudo apt-get install mariadb-server