ESET Protect Virtual Appliance centOS root Database Password Reset

- 19.04.2024
von Thomas Windscheif / Microlinc



Zuerst bitte einen Snapshot der VM erstellen!
Über die Konsole zunächst SSH und Webmin aktivieren:

Via PuTTy o. Ä. auf den Host via SSH verbinden und mit dem root-User anmelden.

Anschließend folgende Befehl absetzen

sudo systemctl stop mysqld
sudo systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
sudo systemctl start mysqld
mysql -u root
mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
mysql> quit
sudo systemctl unset-environment MYSQLD_OPTS
sudo systemctl stop mysqld
sudo systemctl start mysqld

siehe auch https://stackoverflow.com/questions/33510184/how-to-change-the-mysql-root-account-password-on-centos-7/34207996#34207996

Zur Sicherheit habe ich anschließend über die Konsole das Kennwort nochmals geändert.
MICROL!NC - URL zum Artikel: http://microlinc.homeip.net/index.php?lev1=40&lev2=1&id=467 - Ausdruck vom 17.05.2024