How to reset MODX admin password over MySQL cli

You need to run the following query inside your MySQL cli

UPDATE modx_users SET hash_class = 'hashing.modMD5', password = MD5('3f8c369a185a95cfd198e5e') WHERE username = 'admin';

Note, update mysql table prefix, password, username to yours.

Source: https://docs.modx.com/3.x/en/building-sites/client-proofing/security/troubleshooting-security/resetting-a-user-password-manuallyRead the rest

How to reset MySQL root password

Stop MySQL server

service mysqld stop

Start in safe mode

mysqld_safe --skip-grant-tables &

Login mysql server

mysql

Reset your root password

UPDATE mysql.user SET Password=PASSWORD('strong-password-here') WHERE User='root';
FLUSH PRIVILEGES;
exit;

Shutdown your mysql server

mysqladmin -u root -p shutdown

Start your mysql server again

service mysqld start
Read the rest