If you need to change it for UBB.threads, then you're going to need to edit the includes/config.inc.php file. You'll see the settings for the database at the top.