Most MySQL /SQL database uses Localhost as their default hostname but web hosting provider like Godaddy offers unique hostname. After creating your database follow the instructions below on how to find your database details in the Cpanel.
1) Login to your Goddady Webhosting Control Panel
3) Open the specific database you want to connect with (still in the Cpanel)
4) In the Manage Database, click the dropdown menu and choose Details
5) Now in the Database details scroll down, there you will find the right Hostname.
You can check the Code sample menu as well for your guide.
You can check the Code sample menu as well for your guide.
6) Copy and save it. Connect. Connect.Your done!