How to find a the username to connect to the database

Hey guys!

I can’t remember but I thought that you should be able to find all the credentials in the mysql database section but can’t find the dbroot information? Must you add a new user first? I thought that the adding option is to add addition user?

The username must be found on the Client Area if you’re here on InfinityFree; if not it should be on the confirmation email that the reseller has sent you.

For some reason, my $dbroot likes to use my username for the cpanel login screen and not my username that I created, is this wrong?

The $dbroot must use the cPanel Login Screen’s password instead of the one you’ve created.

That makes sense but just wondering why is this so? I mean… it just makes it a bit confusing…

Every reseller must use a randomly-generated username instead of the one you’ve just inputted at the time of registration on the reseller’s signup page. Example of a randomly-generated username: resl_45351951, where resl is the brand of the reseller.

So just to confirm that $dbroot is the cpanel username? I got it working with that informaiton

Yes, $dbroot is the cPanel username.

I guess it is confusing because dbroot stands for database username?

On your code it stands for database username, not root. I found it a little bit confusing and weird :slight_smile:

1 Like

Should be called $CPPanel :grinning:

Or $dbuser :wink:

I forgot where is that phpmailer page again? Where could it be found?

The PHPMailer page could be found here.

1 Like

And to use hotmail, it would be smtp.outlook.com?

No, it would be smtp.office365.com.

Is the $dbpassword the database password or cpanel password?

This is weird… I have a signup form which should take me to a processing page but for some reason, my processing page is just showing a blank white page… My processing code is very long but not sure if I should paste the whole code…

The $dbpassword must be the cPanel password.

It just feels like there is something wrong with my database…Must I use this for cpanel? include_once __DIR__.'/dbh.php';