Run these;
UPDATE `announcements` SET `fid` = '1' WHERE `fid` =5;
UPDATE `delayedmoderation` SET `fid` = '1' WHERE `fid` =5;
UPDATE `forumpermissions` SET `fid` = '1' WHERE `fid` =5;
UPDATE `forums` SET `fid` = '1' WHERE `fid` =5;
UPDATE `forumsread` SET `fid` = '1' WHERE `fid` =5;
UPDATE `forumsubscriptions` SET `fid` = '1' WHERE `fid` =5;
UPDATE `moderatorlog` SET `fid` = '1' WHERE `fid` =5;
UPDATE `moderators` SET `fid` = '1' WHERE `fid` =5;
UPDATE `posts` SET `fid` = '1' WHERE `fid` =5;
UPDATE `reportedposts` SET `fid` = '1' WHERE `fid` =5;
UPDATE `threads` SET `fid` = '1' WHERE `fid` =5;
Replace
5
to the forum ID you want to
Change
.
Make sure you take a backup before running any of these queries as you will not be able to change it back
Probably be easier & safer to just move all the threads to the forum you want them to be in (and/or create a new empty forum with the ID you want and then move them). There are too many things that can go wrong otherwise, since forum IDs are references in so many places (caches too).
Even better solution would be to never attempt to change any ids at all.