Username and password reset

So having a password manager but not actually saving the password in it is not a great idea…

So I’ve reset the password using

php /opt/emoncms/modules/usefulscripts/resetpassword.php

But then I needed to find out the username so thought I’d take a look in the database.

Found the DB details in /var/www/emoncms/settings.ini

but getting access denied doing the below

mysql -u emoncms -p emonpiemoncmsmysql2016
I was then going to try a
SELECT * FROM users;

As far as I know, you have the correct password, so it seems you changed the MySQL password as well, and should have put this in your password managerl…

There is a way to create a second user, then give this user access rights etc. This Login into Emonpi - #6 by pb66 gives the details, though it concentrates on a lost password, it might help with a lost user name.
I don’t know MySQL well enough to know whether this will work.