Remember: if you have never assigned a root password for MySQL, the server does not require a password at all for connecting as root.
However, this is completely insecure !
I know the root password but need to change it
The SET PASSWORD syntax will help you :
SET PASSWORD [FOR user] = password_option
You will get more information at http://dev.mysql.com/doc/refman/5.0/en/set-password.html
I don't know / I forgot the root password - Windows and Linux
All you need to know is here, for Windows and Linux :http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html.
I don't know / I forgot the root password - Other systems
On any platform, you can reset the password using the mysql client :