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

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

# 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


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


Or have the lines automatically added with:

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


sudo apt-get update

sudo apt-get install mariadb-server

-
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 '14 at 11:01

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



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.

-

## 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.

-
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 '14 at 0:07

# 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


I have confirmed it on a local install.

-
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 '14 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 '14 at 10:53

# 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


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


(Re)Sources:

-
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 '14 at 11:03

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

-
Do I need to uninstall mysql before putting mariadb? –  john Oct 8 '11 at 9:31
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 '14 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.