MySQL

Change Forgotten root password in MySQL 5.7.10

After trying several iterations from multiple websites, a combined effort between them made it possible to change the root password to a MySQL install for MysQL 5.7.10 which has changed over the more recent versions.  Anyway, if you were unsuccessful using other approaches, maybe you found this because you didn't give up.  Hopefully, it will work for you as it did for me.

Using a combination of efforts, here are the commands.  Replace the value of MyNewPass with your password.

service mysqld stop
mysqld --skip-grant-tables &

UPDATE mysql.user 
    SET authentication_string = PASSWORD('MyNewPass'), password_expired = 'N'
    WHERE User = 'root' AND Host = 'localhost';
FLUSH PRIVILEGES;

Source(s)
https://forums.freebsd.org/threads/55225/
http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html