[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mariadb uninstall/reinstall



On Thu, Sep 14, 2017 at 08:36:33AM -0700, larry owens wrote:
> Colleagues
> 
> I've been a loyal Debian user since (I believe) release 4.  I also use
> Debian as the basis for a college course I teach in C programming so the
> students get 'nix exposure in addition to C.  As is my custom I typically
> wait a few months after a new release and then convert to the new Debian.  I
> am just finishing the upgrade to Stretch and have run into an issue.
> Somehow as part of the conversion for my LAMP server I screwed up the Maria
> db.  After trying to repair the installation I have decided to remove and
> reinstall.  Unfortunately I have been unable to find a set of instructions
> to safely remove Maria.  Can anyone point me to a working process (the one's
> on the web currently don't seem to work).  TIA

You can think of it as being three parts:

1. the mariadb program files

2. the configuration for mariadb, some of which is setup
automatically by Debian on install, and some of which you may
have (or may have to) configure yourself.

3. the database data files

apt-get remove mariadb
    will remove the program files, leaving (2) and (3) alone.

apt-get purge mariadb
    will remove the program files and the existing
    configuration, leaving (3) alone

apt-get install mariadb
    will install the program files and re-create the basic
    configuration.

If you want the database datafiles to go away, after doing
a purge, you should delete them. They are probably in
/var/lib/mysql or /var/lib/mariadb, but you could have directed 
the database to put them elsewhere.

-dsr-


Reply to: