Sort of taken from MySQL docs.
From Mac/Unix:
$ mysql -u root mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES;