Changing mysql root password on Windows after removing mysqld-nt.exe
I got that work using otherwise a much simpler way:

sign in normally to mysql on command line or using the MySQL workbench;

mysql -u root -p


Use mysql database

use mysql;


update user password using simple update query.

update user set password=PASSWORD("NEWPASSWORD") where User='root' and Host = 'localhost';


then flush:

flush privileges;


Done!