Hi,

In my settings.php I have the following:

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'my_databasename_D7',
'username' => 'myusername',
'password' => 'my Cpanel Password',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);

Question to you, if I don't give the Cpanel password here ( 'password' => 'my Cpanel Password',) then my site does not work any more. I am some how afraid to use my cpanel password in this way. Any alternative of this? Can anybody read it?

Comments

Ayesh’s picture

You don't have to enter your cPanel username and password.
In cPanel, go to MySQL databases page, and create a new user (with a password). Then, you can add this user to the database you are using in settings.php file, and grant all permissions.

Your hosting company should be able to help you in this. CPanel UI can differ from host to host, but the steps are usually the same.

aktarjahan2003’s picture

Thanks for help.