Install MariaDB 10.6/10.5 on Fedora 35/34, CentOS Stream 8/RHEL 8.5/Rocky Linux 8.5 - Comment Page: 1

MariaDB is a binary drop in replacement for MySQL database server. This means that for most cases, you can just uninstall MySQL and install MariaDB and you are good to go. Why MariaDB? MariaDB is totally open source version of MySQL It works just like MySQL and is compatible with MySQL setups Fedora and Red Hat/CentOS/Rocky Linux use MariaDB instead of MySQL [inttf_post_ad1] This is guide, howto install or upgrade MariaDB 10.7.1 [RC], 10.6.3 [stable] or 10.5.13 [stable] on Fedora 35/34/33, CentOS Stream 8, Red Hat (RHEL) 8.5 and Rocky Linux 8.5. Installing MariaDB is almost same process than install MySQL. Note: If you are moving from MySQL, then make sure that you backup...

36 comments on “Install MariaDB 10.6/10.5 on Fedora 35/34, CentOS Stream 8/RHEL 8.5/Rocky Linux 8.5 - Comment Page: 1

1 2
    1. Just today I started thinking I wanted to put MariaDB on my lamp stack, and started to look around for a guide. Low and behold, a solid guide was posted five days ago. Perfect timing. Thanks for the great guide.

      • Hi Brian,

        Thanks and you are welcome! Nice to hear that you liked this guide!

    2. Thank you very much for the info.

    3. Thank you. I just upgraded to Fedora 19, and decided to replace mysql with MariaDB. I got mysql up so long ago I forgot the basic installation stuff, and wanted to interface Eclipse as soon as possible.

      This was a very complete, short, set of steps.

    4. i always tried to install mariadb or mysql, but when i enter this code:

      “yum install mariadb mariadb-server”

      or this:

      “yum install mysql mysql-server”

      i always get this error:

      “Error: Cannot retrieve metalink for repository: fedora/19/i386. Please verify its path and try again”

      anyone please help me. thank you

      • Hi Subkhan,

        Could you post output of following commands:

        uname -a
        yum repolist
      • Hi Josh,

        MariaDB repo is official MariaDB repo. Address you point, should return empty page, but if you use exact command on EL5, EL6, F17, F18, F19, then you should get repo file content, try following on command line:

        echo$(rpm -E %fedora)/$(uname -i)/5

        You should get url, like:

        where you should find following content:

        # MariaDB 5.5 CentOS repository list
        name = MariaDB
        baseurl =

        This is just helper script, which is much easier use (or at least explain) than MariaDB’s own repo generator. Biggest mistake on mariadb repo is directory naming, like:

        Which doesn’t make sense on Fedora or CentOS/RHEL. Paths should be compatible with $releasever, $arch and $basearch variables which are available on repo files.

    5. thank you JR. definetly makes sense now.

    6. I had trouble with the secure installation. It could not find /usr/bin/mysql.

      This link:

      did a nice job of hooking me up with CentOS rpms that I could use with yum.

      Not sure how this jives with what you said in your Dec 2 reply (Biggest mistake on mariadb repo is directory naming…) but it got me past the secure installation.

      Love the site, it’s a def goto for my CentOS/Fedora configs. Thanks!

      • Hi Daniel,

        This uses exactly same repo, MariaDB original repo. And when you use step 2. commands to get repo file, it’s same what you get using their browser based repo file generator. If you wonder why to use wget instead browser, you see the point, if you have to do it thousand times on different servers. :) If you want use MariaDB repo generator, it’s totally okay and result is same and you can still use this guide to install it.

    7. Autostart MySQL on boot (Fedora 20):
      sudo systemctl enable mariadb.service

      • Hi Mojtaba,

        Both works:

        systemctl enable mysqld.service
        ## OR ##
        systemctl enable mariadb.service

        mysqld.service is symbolic link to mariadb.service.

        ls -la /usr/lib/systemd/system/mysqld.service
        lrwxrwxrwx. 1 root root 15 Jan  7 01:30 /usr/lib/systemd/system/mysqld.service -> mariadb.service
    8. Hi JR,

      Thank you JR.

      Symbolic link:

      ls -l /usr/lib/systemd/system/{mysqld.service,mariadb.service}
      -rw-r--r--. 1 root root 1695 Nov 27 17:56 /usr/lib/systemd/system/mariadb.service
      lrwxrwxrwx. 1 root root 15 Jan 4 11:58 /usr/lib/systemd/system/mysqld.service -> mariadb.service

      But when enable mysqld.service:

      # mysqld.service not work(only for "ENABLE" service)
      systemctl enable mysqld.service
      Failed to issue method call: No such file or directory

      mysql -V
      mysql Ver 15.1 Distrib 5.5.34-MariaDB, for Linux (x86_64) using readline 5.1

      uname -srp
      Linux 3.12.6-300.fc20.x86_64 x86_64

    9. I don’t even know why I bother going to any other website for guides. You guys post the best guides and they just WORK. Thank you very much.

    10. JR,

      Thanks for your help and you are very knowledgeable, I really appreciate and proud of you all the hard work you are doing!!! KUDOS TO YOU!!!

      My end goal is to use PHP to query results on my WEB browser.

      So, I run a small script to test my connection to my MySQL/MariaDB database.

      When I run the php file on my browser localhost/file.php

      All I get is a BLANK white page. Any suggestions what I am doing wrong?

      Any help is greatly appreciated.



      username can be either ROOT or the one that is used to login into the desktop first. either should work.

      Any help is greatly appreciated.

    11. My code did not show up in the above comment. sorry. it should look something like this.

      $hostname = “localhost”;
      $username = “root”;
      $password = “password”;

      // Create connection to the database
      $dbhandle = mysql_connect($hostname, $username, $password);
      or die (“unable to connect to MySQL”);
      echo “connected to MySQL”;

      • Hi amir,

        Could you check your web server access and error logs, is there any errors?

    12. I am not sure what I am looking for?

      is it under /var/logs/httpd ???

      which log file I should be looking at?

      under httpd there is access_log or error_log file?

      • Hi amir,

        Yes, you find right place and both access_log and error_log are interesting. You can post both content here or example

    13. JR,

      Do you have a guide for installing SENDMAIL or POSTFIX for FEDORA 20.

      I am very frustrated right now. I have working for 2 weeks straight to get POSTFIX working my FEDORA 20 server. I think my ISP is blocking port 25, Any way to get around that. I have heard something about relaying SMTP?

      Any help is greatly appreciated.

1 2

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.