You have to update the database user’s password using the OLD_PASSWORD function of MySQL.
SOLUTION
For example:
[rajesh-tpl-01@home ~]$ mysql -u root -p mysql
Enter password:
mysql> update user set password=OLD_PASSWORD('password') WHERE
user='username';
Query OK, 0 rows affected (0.02 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)