Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
Check this one i found on internet zobnetworks.com/tutorials/linux/… It looks kind of easy to do it. Enjoy –  user270846 Apr 19 at 8:49

5 Answers 5

up vote 23 down vote accepted
+50

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 http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main
      deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main
      

      Or have the lines automatically added with:

      sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu precise main' 
      
    • For Version 5.5:

      deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main
      deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main
      

      Or have the lines automatically added with:

      sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu 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.

share|improve this answer
    
Be aware, that this adds a second repository with the path main to your sources, which can lead to conflicts: askubuntu.com/questions/425516/… –  rubo77 Feb 25 at 11:01

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 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu $(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.

share|improve this answer
    
I get: dpkg: error processing /var/cache/apt/archives/libmysqlclient18_5.5.32+maria-1~raring_amd64.deb (--unpack): libmysqlclient18:amd64 5.5.32+maria-1~raring (Multi-Arch: no) is not co-installable with libmysqlclient18 which has multiple installed instances –  Nicolas Raoul Sep 9 '13 at 7:56
    
Using Ubuntu 13.10, I skipped the certificates/keys steps and it worked like a charm. –  user14092 Dec 7 '13 at 18:20
    
What aboout MariaDB 10? –  rubo77 Feb 18 at 7:34
    
Be aware, that this adds a second repository with the path main to your sources, which can lead to conflicts: askubuntu.com/questions/425516/… –  rubo77 Feb 25 at 10:53

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.

share|improve this answer
    
Do you have to enable universe repos or similar? On 14.04.1 LTS I'm getting "Unable to locate package mariadb-server" –  Jason O'Neil Sep 16 at 0:07

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 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu 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
# http://mariadb.org/mariadb/repositories/
deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu quantal main
deb-src http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu quantal main  

(Re)Sources:

https://kb.askmonty.org/en/installing-mariadb-deb-files/

https://downloads.mariadb.org/mariadb/repositories/

share|improve this answer
    
Be aware, that this adds a second repository with the path main to your sources, which can lead to conflicts: askubuntu.com/questions/425516/… –  rubo77 Feb 25 at 11:03

At this moment, MariaDB does not have Oneiric repository, but only Natty (11.04): http://downloads.askmonty.org/mariadb/repositories/

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

share|improve this answer
    
Do I need to uninstall mysql before putting mariadb? –  john Oct 8 '11 at 9:31
2  
Why MariaDB is not included in normal ubuntu repositories? Does Phpmyadmin work with mariadb? –  john Oct 8 '11 at 9:31
    
I never done it, but I think you can have both MySQL and MariaDB on system, using different ports (es. 3306 and 3307). MariaDB is not included in normal repositories, because it is not so largely used like MySQL. For PHPMyAdmin, it should work because MariaDB says to be full compatibile with MySQL connectors: kb.askmonty.org/en/mariadb-versus-mysql –  Pisu Oct 8 '11 at 13:54
    
MariaDB is binary compatible with MySQL most things will not be able to tell the difference. Phpmyadmin will work, MySQLWorkbench works fine too on my system. When you ask for an InnoDB table you really get a XtraDB table, I have some queries that require a number of expensive inner selects... I have not found a query that performs slower on my tables and at least one important one takes only a third the time it used to. –  Quaternion Dec 1 '11 at 22:42
    
+1 for pointing to the configuration tool. –  0xC0000022L Feb 1 '13 at 3:07

protected by Community Apr 19 at 9:14

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.