Secure MariaDB Debian Stretch installation -- Fix MySQL Root password-less -- Create Debian-Sys-Maint


1. Debian Stretch password-less problem and missing debian-sys-maint

Latest installation for MariaDB in Debian Stretch leaves installation without root password and without debian-sys-maint user.

This is problematic because:

  • Having no MySQL root password makes your system weaker.
  • It also provides more opportunities to shoot yourself.

At the same time, if you run recommended script to close mysql_secure_installation plus additional recommendations, you endup having a password protected MySQL root but, because there is no debian-sys-maint, it creates problems with scripts like /etc/init.d/mysql and similar that relies on having debian-sys-maint created and fully declared at /etc/mysql/debian.cnf

In essense, closing/securing your MySQL root account implies also creating a debian-sys-maint.

2. How to fix MySQL root password-less and debian-sys-maint with Core-Admin

Update your installation and run the following script:

crad-update.pyc -u
crad-update.pyc -g

It will ask for root password. Enter the one that was already configured or the one you want to configure in the case it is still password-less.