The error message is quite clear:
There is no
mysqld_safe
command on your system or it can't be found.
You have to determine how the MySQL server is started on your system. This is usually done using a start script. You have tagged your question with MacOS. I have not used MacOS so far but the MySQL installation for MacOS provides some hints:
Use either launchctl from the command line, or start MySQL by clicking "Start" using the MySQL preference pane.
Use one of these methods to stop the server and restart it passing the
--skip-grant-tables
parameter or after having added it to a configuration file.
For instructions on how to reset the root password see the official documentation:
MySQL :: MySQL 5.7 Reference Manual :: B.5.3.2 How to Reset the Root Password[
^].