The problem you have isn't with JForum. The problem you have is that you've forgotten the database credentials. I'm suggesting that you either reset the password of the db user you have, or create a new one to access your database. Assuming you have user creation rights on your database this should be a trivial task for you since you've done it before.
Do you know how to administer a mysql database? I assumed you had setup the database for the original JForum installation so would know how to do these things.
"But I couldn't login with this" is not enough information. Exactly what is the problem here? Does the database exist? Does the username exist? Is the password incorrect? Please be very specific about what errors you are seeing.
It looks like you either don't have a database installed on your system, or the database isn't running. This has nothing to do with JForum and I recommend you refer to the documentation for whatever database you wish to use, say MySQL, to get that set up.