forgot password for root in mysql code example
Example 1: mysql set root password
use mysql;
update user set authentication_string=PASSWORD("mynewpassword") where User='root';
flush privileges;
quit
Example 2: how-to-remove-mysql-root-password
mysqladmin -u root -pType_in_your_current_password_here password ''