Administrating a MySQL server
Setting the password:
1. From Unix shell:
shell> mysql -u username -h hostname -p password
mysql> SET PASSWORD FOR 'username'@'localhost'=PASSWORD('new_password');
2. Directly manipulate the privilege tables:
shell> mysql -u username -h host -u username -p
mysql> UPDATE user SET Password=PASSWORD('new_password') WHERE user='root';
mysql> FLUSH PRIVILEGES;
3. Using the mysqladmin command:
shell> mysqladmin -u username password new_password
In our case we were able to change password specifying host name along with user ...