@diomed You have to configure the SMTP/mail settings for restoring your password, you can find more info through the official docs. Once you’ve done that, restart Ghost and you should be able to reset your password.
You should be able to insert a new password into the database - however as we don’t store plain text passwords in the database you’ll have to hash it first.
how do I edit ghost database?
I’m on windows and when I open it with text editor it’s just series of numbers and letters.
I need some database editor, I guess.
If you’re not sure about how to edit your database I would advise you to follow @Tony’s advice above and set up your mail setting according to the ghost docs. Here’s the link again https://docs.ghost.org/docs/mail-config