Get the most out of your Centmin Mod LEMP stack
Become a Member

Reinstall Mariad-db/Mysql

Discussion in 'Install & Upgrades or Pre-Install Questions' started by GRV, Jul 26, 2021.

  1. GRV

    GRV New Member

    3
    0
    1
    Apr 16, 2020
    Ratings:
    +0
    Local Time:
    12:49 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01-mariadb105
    • Nginx Version Installed: 1.21.1
    • PHP Version Installed: 7.4.2.0
    Hello everyone. I am not a very tech-savvy guy but I know my way around servers. I fucked up with my centminmod maria-db/mysql installation and I think I removed it or got it corrupted.
    I wish to install mariad-db/mysql from scratch so that I can get my websites up and running again. Please help me out.

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    What issues/errors you get now? Corruption depending on severity can be repaired usually without wiping your data.

    Do you have any installed/imported MySQL database data already? Or nothing besides the initial Centmin Mod install? Sounds like you have MySQL data already installed?

    This guide wipes all data and recreates MySQL system database only, your site databases would all be deleted MariaDB - Insight Guide - How to use mysql_install_db to reset your MySQL database directory
     
  3. GRV

    GRV New Member

    3
    0
    1
    Apr 16, 2020
    Ratings:
    +0
    Local Time:
    12:49 AM
    I have the sites with their DBs. It's just mysql isn't installed anymore. I tried installing mariadb-server via yum but now I can't run it.

    When I run "service mysql start" I get the below error.


    mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    /etc/init.d/mysql: line 260: kill: (3494) - No such process
    ERROR!
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,400
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You may have accidentally uninstalled MariaDB server in the past? Even if you did, data would still be intact at /var/lib/mysql

    Check your YUM history transactions to see if you accidentally removed MariaDB-* YUM packages, post output for these commands
    Code (Text):
    yum history list MariaDB*

    and
    Code (Text):
    yum history list mariadb*

    for posting code or output from commands to keep the formatting, you might want to use CODE tags for code How to use forum BBCODE code tags :)

    Then you can drill down into specifics for each YUM transaction using the transaction id i.e. XX on left column of output
    Code (Text):
    yum history info XX


    The idea is to see if any YUM transactions ended up removing/uninstalling MariaDB YUM packages. Cause if they did, you can easily reverse the YUM transaction via yum history undo commands How to Undo or Redo a Yum Install on CentOS and RHEL