====== Mysql Mariadb Cacti PW Reset ====== Resetting mysql/mariaDB passwords. ---- ====== MySQL/MariaDB Root PW ====== To reset a forgotten root password on MySQL/MariaDB: * Determine if it is mysql vs mariadbmysql --version * Stop the database * MariaDBsystemctl stop mariadb * MySQLsystemctl stop mysql * Start the database manually, skipping grants and networkingmysqld_safe --skip-grant-tables --skip-networking & * Login as root (should not be prompted)mysql -u root * Set new root password for the databaseMariaDB [(none)]> update mysql.user set password=password('MyNewPass') where user='root'; * Flush privilegesMariaDB [(none)]> flush privileges; * Exit the databaseMariaDB [(none)]> exit * Stop the database, using the newly set pw(prompted)mysqladmin shutdown -u root -p * Start the database server with normal settings * MariaDBsystemctl start mariadb * MySQLsystemctl start mysql ---- ====== Cacti ====== Resetting the cacti local admin pw. * Login to the cacti databasemysql -u root -p cacti * Requires knowledge of the mysql root pw * Set a new password for the cacti adminMariaDB [cacti]> update user_auth set password=md5('newpasswordhere') where username='admin'; ----