The password to cPanel and your database access are completely independant. The reuse of the same password for both is bad practice.
If I change the password against this user/username in MySQL database then do I have to change it in some part of any file/code?
Yes, the database username and password are in your wp-config.php file.