Tell me more ×
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

4 Answers

up vote 8 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

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 at 3: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 PPA:

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

This might help:
http://askmonty.org/blog/ornery-oneiric/

share|improve this answer
The repositories have now been updated to include support for Oneiric. Please check downloads.askmonty.org/mariadb/repositories – nikhil500 Nov 23 '11 at 7:52
At this time I do not think that is true... That tool shows what lines to add to apt but when you update the addresses are invalid. I tried them manually... and oneiric is simply missing. Very frustrating. – Quaternion Dec 1 '11 at 23:05
What I said above only applies to 5.3, if you are going to use 5.2 there is no issue. It is a shame as 5.3 has some nice features. – Quaternion Dec 1 '11 at 23:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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