Step 1.
$ sudo /usr/local/mysql/bin/mysqld_safe –user=root &
//start MySQL(Also, can start MySQL in System Preferences)
Step 2.
$ sudo /usr/local/mysql/bin/mysqladmin -uroot password yourpassword
//set MySQL password to yourpassword(Attention: this command used when there is no password the first time)
OR
Step 2.
$ sudo /usr/local/mysql/bin/mysqladmin -uroot -pyourCurrentpassword password yourNewpassword
//change MySQL password to yourNewpassword(Attention: this command used to change the current password)