From MikroTik Wiki
RouterOS password can only be reset by reinstalling the router, or using the reset button (or jumper hole) in case the hardware is RouterBOARD.
For X86 devices, only complete reinstall will clear the password, along with other configuration. For RouterBOARD devices, several methods exist, depending on our model.
Most RouterBOARD devices are fitted with a reset button.
Using: unplug the device power, hold the button, apply power and wait until the USER LED starts flashing. Now release the button to clear configuration.
Note: If you wait until LED stops flashing, and only then release the button - this will instead launch Netinstall mode, to reinstall RouterOS.
Jumper hole reset
All RouterBOARD current models are also fitted with a reset jumper hole. Some devices might need opening of the enclosure, RB750/RB951/RB751 have the jumper hole under one of the rubber feet of the enclosure.
Using: Close the jumper with a metal screwdriver, and boot the board until the configuration is cleared.
Jumper reset for older models
The below image shows the location of the Reset Jumper on older RouterBOARDs like RB133C:
Note: Don't forget to remove the jumper after configuration has been reset, or it will be reset every time you reboot.