service mysql stop
mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('new-secret')
WHERE User='root'; FLUSH PRIVILEGES;"
killall mysqld_safe; service mysql start
service mysql stop
mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root -e "UPDATE mysql.user SET Password=PASSWORD('new-secret')
WHERE User='root'; FLUSH PRIVILEGES;"
killall mysqld_safe; service mysql start