In order to connect to your database, you need some lines of code where the parameters of connection are set and where the actual connection is done.
If you are using a good editor, search for the string 'mysql_connect' in all your pages and examine the one you come across first.
It should be written as;
mysql_connect('servername','database user', 'database password')
Depending on which scipt you are using, the variables ('servername','database user', 'database password') could be located in an external config file. Check the top of this page for any includes and navigate to those files.
find the variables 'servername','database user', 'database password' and equal them to your parameters.
If this is too hard, you could tell us which script you are using and we could tell you exactly which file to edit.
good luck!