Discover Centmin Mod today
Register Now

Install MariaDB Completely Remove / Uninstall MariaDB

Discussion in 'Install & Upgrades or Pre-Install Questions' started by ethanpil, Mar 27, 2017.

  1. ethanpil

    ethanpil Active Member

    168
    47
    28
    Nov 8, 2015
    Ratings:
    +87
    Local Time:
    9:41 PM
    I am setting up a few servers which will need nginx only and not mariadb (they will use an external mariadb server). I would like to use centminmod to manage the NginX/PHP, etc but I want to remove mariadb.

    What is the most recommended way to do this? Should I just stop mariadb service or yum remove mariadb? I would like to maximize my available resources and disk space without affecting centminmod, or having to repeat the steps every upgrade.

    Based on the install scripts, why not just..

    Code:
    yum -y remove MariaDB-client MariaDB-common MariaDB-compat MariaDB-devel MariaDB-server MariaDB-shared
    As a side/similar question, would you suggest to install centminmod and remove nginx/php so I can use the optimized MariaDB configuration on the non-http servers?

    Thanks for your advice.
     
    Last edited: Mar 27, 2017
  2. eva2000

    eva2000 Administrator Staff Member

    30,180
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    9:41 PM
    Nginx 1.13.x
    MariaDB 5.5
    Recommended way is just to stop mariadb mysql server and disable it without removal

    on web servers without mariadb do
    Code (Text):
    service mysql stop
    chkconfig mysql off
    

    on remote mysql servers, do for php and nginx
    Code (Text):
    service php-fpm stop
    chkconfig php-fpm off
    

    Code (Text):
    service nginx stop
    chkconfig nginx off
    

    You'd not going to save too much disk space by removal and with it stopped and disabled no cpu/memory at all. This is recommended, so if for whatever reason your remote mysql server fails, you can quickly just start up the service on one of the servers as fall back ASAP.

    Same with if web server fails, you can quickly restart nginx and php-fpm services on remote mysql server as fallback ASAP.

    MariaDB 10.1.22 yum install size in bytes
    Code (Text):
    rpm -qa --queryformat '%10{size} - %-25{name}  %{version}' | sort -n | grep MariaDB
        546004 - MariaDB-common             10.1.22
       6774428 - MariaDB-shared             10.1.22
       8142112 - MariaDB-compat             10.1.22
      40095202 - MariaDB-devel              10.1.22
     178133028 - MariaDB-client             10.1.22
     455660993 - MariaDB-server             10.1.22
    
     
    Last edited: Mar 27, 2017