Using PHPMyAdmin simplifies greatly MySQL database administration, but there are times where this software is not available...
So to change a user's password from the commandline, follow this procedure :
[root@MyServer /]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 89057 to server version: 4.1.12
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> set password for 'root'@'localhost' = PASSWORD('MyNewPassword');
Query OK, 0 rows affected (0.05 sec)