if your using php then it would be something like this
mysql_connect(localhost,username you created in cpanel,password you created in cpanel);
example
my cpanel username is 1
example i created a mysql username 12
and a password of 43
mysql_connect(localhost,1_12,43);