Hi @rahul2gupta ,
it's long to describe the steps to configure DB connect to connect to a DB!
Anyway, you can follow the steps described at https://docs.splunk.com/Documentation/DBX/3.3.1/DeployDBX/ConfigureDBConnectsettings
In few words:
Ciao.
Giuseppe