Manual:Reset
RouterOS password can only be reset by reinstalling the router, or using the reset jumper (or jumper hole) in case the hardware is RouterBOARD. For RouterBOARDS just close the jumper and boot the board until the configuration is cleared. For some RouterBOARDs there is not a jumper, but a jumper hole - just put a metal object into the hole, and boot the board.
This image shows the location of the Reset Jumper on older RouterBOARDs like RB133C: