Yeah, you can change the password from .threads CPanel by going to DB,Paths & URLs, then you do not need to touch config.inc.php at all it will all be done for you. This will be the password that .threads uses to access your database. But most importantly you have to be able to change the password for the actual database as well, and this should be possible from the CPanel provided to you by your hosting company.
So yeah, shut the board, change the database password using CP provided by your hosting company, then change the password using CP provided by UBB.threads, open the board.