The part that's likely missing is the link of the username and the database. In the control panel under the MySQL section you'll add a database. Then you add the user with the password. Each of these then become prefaced with your cpanel name "username_" except for the password.
Host Name: localhost
The last step is to add the user to the database (that's the part that many people seem to miss). At the bottom of the page there are two drop down menus. One has the user and the other has the database. Line the two of them up and click "Add user to DB" - this will now grant access privileges to that user to the database.