sudo /usr/local/mysql/support-files/mysql.server stop
sudo mysqld_safe --skip-grant-tables
mysql-u root
mysql>UPDATEmysql.userSETauthentication_string=PASSWORD('password')WHEREUser='root';
mysql > FLUSH PRIVILEGES;