How to reset the MySQL root password on an Ubuntu server

As a brief note to self, if you forget the MySQL root password again, these are the steps you followed to create a new MySQL root password on an existing MySQL server running on Ubuntu 16.x:

$ service mysql stop

$ mysqld_safe --skip-grant-tables &

$ mysql (or `mysql -u root`)

mysql> use mysql;
mysql> flush privileges;
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("NEW_PASSWORD");
mysql> flush privileges;
mysql> quit

$ kill [mysql pid]

$ service mysql start

References I used: