如果是忘记了admin的密码,可以在linux的命令行下执行下面的命令:
mysql -e "update cacti.user_auth set password=md5("123456") where id='1';flush privileges;"
只要能登陆MySQL,就可以改用户的密码:
mysql> select*from user_auth;
+—-+———-+———————————-+——-+—————+———————-+———–+———–+————–+—————-+————+—————+————–+————–+————————+———+
| id | username | password | realm | full_name | must_change_password | show_tree | show_list | show_preview | graph_settings | login_opts | policy_graphs | policy_trees | policy_hosts | policy_graph_templates | enabled |
+—-+———-+———————————-+——-+—————+———————-+———–+———–+————–+—————-+————+—————+————–+————–+————————+———+
| 1 | admin | e10adc3949ba59abbe56e057f20f883e | 0 | Administrator | | on | on | on | on | 1 | 1 | 1 | 1 | 1 | on |
| 3 | guest | 96e79218965eb72c92a549dd5a330112 | 0 | Guest Account | | on | on | on | on | 3 | 1 | 1 | 1 | 1 | on |
+—-+———-+———————————-+——-+—————+———————-+———–+———–+————–+—————-+————+—————+————–+————–+————————+———+
2 rows in set (0.00 sec)