xxxxxxxxxx
sudo /usr/local/mysql/support-files/mysql.server stop
sudo mysqld_safe --skip-grant-tables
mysql -u root
UPDATE mysql.user SET authentication_string=null WHERE User='root';
mysql -u root
UPDATE mysql.user SET authentication_string=PASSWORD("newpassword") WHERE User='root';
FLUSH PRIVILEGES;