this article from Host Gator support should help:
how-to-connect-to-the-mysql-database
This section near the top has info on the settings to use for the connection:
Host name = localhost (literally put localhost)
Database name = (cpanelUsername_databaseName)
Database username = (cpanelUsername_databaseUsername)
Database password = (whatever you picked)