Well i had a forum which had about 6000 posts but basically its phpbb and i set it up with like a different database and prefix etc but i want to recover it so what do i do like what should i change in the config file when its on the same database as my current forum.
What do you mean by having set it up on a different prefix?
If you need to move your phpBB install to a new server, you'll first want to change the database connection info to connect to the new database in your configuration file, but the prefix should be left to the actual prefix of the actual, previous database, since the prefix goes in front of the names of all of the tables. Then import the existing database into the new one with phpmyadmin.
If you mean that you have set up a PHPBB install on a different server with a different prefix already, then just import the existing database into the new one with phpmyadmin, then change the database's prefix in config.php to be the same prefix that the old forum used.