The hostname to connect to is "localhost"; without the quotes. The database username and password needs to be entered exactly as it appears in the MySQL manager in your control panel (CPanel) ie username_dbname, etc. When you create a username in cpanel, please be aware that there is an 8 character limit. Extra characters will be dropped.
Additionally, please make sure you have added the database user to the access list for the corresponding database. For best results if you do not have a static ip address you need to add a single % sign to the access host list in the sql manager of your cpanel. The port is 3306