You know where the error is happening? You write the code?
Read the error. It is using your cPanel name and no password. Somewhere, your script is trying to connect to the MySQL server with the default values, ie, not the values in your configuration file. Blanks.
Did you forget to include...