All your databases need to be created using the cPanel -> Databases
You can use the MySQL Databases or the Wizard. Go thru all the steps (Name database, create user, give user proper privileges).
Then you can go to phpMyAdmin and access the database.
If you want to connect to this database, on your php code, you will use the credentials created above and your hostname will simply be: localhost