Whether you are using Wordpress, Magento, Drupal or something completely custom to your site, the connection to the database should be pretty similar.
When you register you host you will receive alle the necessary information about your database.
The database most often runs on the same server as your website, therefore you should input
"localhost" as the database server, instead of the server name.
You configure the database in the following files:
Most commonly you will have to fill in:
and in some cases port (3306). All this is provided inn the mail received when adding a host, site or database.