linux_wiki:mysql_mariadb_cacti

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux_wiki:mysql_mariadb_cacti [2019/09/07 11:09] (current)
billdozor created
Line 1: Line 1:
 +====== 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 mariadb<code bash>mysql --version</code>
 +  * Stop the database
 +    * MariaDB<code bash>systemctl stop mariadb</code>
 +    * MySQL<code bash>systemctl stop mysql</code>
 +  * Start the database manually, skipping grants and networking<code bash>mysqld_safe --skip-grant-tables --skip-networking &</code>
 +  * Login as root (should not be prompted)<code bash>mysql -u root</code>
 +    * Set new root password for the database<code bash>MariaDB [(none)]> update mysql.user set password=password('MyNewPass') where user='root';</code>
 +    * Flush privileges<code bash>MariaDB [(none)]> flush privileges;</code>
 +    * Exit the database<code bash>MariaDB [(none)]> exit</code>
 +  * Stop the database, using the newly set pw(prompted)<code bash>mysqladmin shutdown -u root -p</code>
 +  * Start the database server with normal settings
 +    * MariaDB<code bash>systemctl start mariadb</code>
 +    * MySQL<code bash>systemctl start mysql</code>
 +
 +----
 +
 +====== Cacti ======
 +
 +Resetting the cacti local admin pw.
 +
 +  * Login to the cacti database<code bash>mysql -u root -p cacti</code>
 +    * Requires knowledge of the mysql root pw
 +  * Set a new password for the cacti admin<code bash>MariaDB [cacti]> update user_auth set password=md5('newpasswordhere') where username='admin';</code>
 +
 +----
  
  • linux_wiki/mysql_mariadb_cacti.txt
  • Last modified: 2019/09/07 11:09
  • by billdozor