To get the database transfered to your live server you will want to export it from your localhost, then import it into the live server. Your host will likely have a gui tool for you to do this like phpMyAdmin or something similar.
Once the db is transfered you will need to update the connection file on the live server. You will need to use the same credentials that you connect to the live database with. If the database is on the same server as the domain then localhost should work, otherwise you will need to use the domain or IP for your database. If this is needed the details should be available from your host.
Once you update the connection with this you will also need to ensure you have the correct username, password and database name referenced. You then just upload this file like any other page in your site, if it has the correct values in it for your live db and you have imported the db on the live server successfully it will work for you.