Install MariaDB 5.5 Database in RHEL/CentOS/Fedora and Debian/Ubuntu

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Narad Shrestha

He has over 10 years of rich IT experience which includes various Linux Distros, FOSS and Networking. Narad always believes sharing IT knowledge with others and adopts new technology with ease.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

11 Responses

  1. The mirror http://mirrors.scie.in/mariadb/repo/5.5 was mentioned for installing the MariaDB on debian and ubuntu is no more possible. Is there any alternative mirrors?

  2. Narad says:

    Please do the followings:-

    1. Stop MariaDB
    2. Copy the existing data directory i.e. /var/lib/mysql (default location) to new location
    3. Edit the MariaDB configuration file.
    4. Search entry for datadir or create the new one as below.

    datadir = /newpath

    5. Restart mariadb service.

  3. Leo says:

    What abt The latest version can that be installed?

    • Ravi Saive says:

      Yes you can, but I need to update this article to support latest stable version installation.

      • My installation is centos 6.5 and MariaDB 10.07

        I use mariadb over a year on my notebook (fedora 19, and currently mariadb 5.5). On the notebook I changes the data directory to /home/db/mariadb by changing in /etc/my.cnf datadir=/var/lib/mysql to datadir=/home/db/mariadb. After restart of mysqld it works fine and all my data resides in that directory.

        In the instant case /etc/my.cnf does not contain any data. Likewise the sample cnf file do not have an entry for datadir. Once the parameter datadir is entered the server starts but complains, in my case, on write error due to inability to access /var/lib/mysql/[my server name].pid.

        Can you please suggest how to change datadir on Centos 6.5 with MariaDB 10.07. If I live the deafault of /var/lib/mysql, every thing works fine.

  4. Narad, any thoughts on trying to run this on s390x architecture ?

    PS: you dont need a real IBM mainframe to port, you can use Hecules ie: http://fedoraproject.org/wiki/Architectures/s390x

  5. Amir Dayyan says:

    i got this error after replacing default installed MariaDB to MYSQL in my Fedora 19

    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

    I tried installing MariaDB again but i still got the error (after removing mysql server)

    • Check your mysql daemon is running if not start with below command.

      Start the mysqld daemon.
      # systemctl start mysqld

      To enable mysql daemon to start at boot
      # systemctl enable mysqld.service

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?