cPanel Joomla MySQL issue

mojamoi

Well-Known Member
Jul 23, 2007
186
0
66
Hello

for a cpanel joomla installed site i get this error

Database connection error (2): Could not connect to MySQL.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

What method did you use to install Joomla? Have you ensured your database name and database username details are accurate in your Joomla configuration file? Do you have root access to your system?

Thank you.
 

mojamoi

Well-Known Member
Jul 23, 2007
186
0
66
I do not have root access and do not have ssh access.

It is just a cpanel account.

in phpmyadmin the database name comes as database1_dbname , database1_user1
May I know whether in the configuration.php it should come as database1_dbname,database1_user1 or as just dbname, user1.

is teh prefix as in phpmyadmin i.e database1 required

and in configuration.php it comes as just dbname

- - - Updated - - -

I used the method of softaculous installation of joomla
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Yes, the prefix is included in the database name and should be used in your script's configuration file.

Thank you.
 

Brijesh-soft

Registered
Verifed Vendor
Aug 16, 2011
3
0
51
solved :)

i had missed localhost
Hi,

I am from the Softaculous team.
If you installed it via Softaculous it should have filled in the correct details i.e. database host as well as database name and password. Did you change the configuration.php manually ?
 

mojamoi

Well-Known Member
Jul 23, 2007
186
0
66
Hi,

I am from the Softaculous team.
If you installed it via Softaculous it should have filled in the correct details i.e. database host as well as database name and password. Did you change the configuration.php manually ?
I did not change anything manually but I had to replace hostname with localhost to make it work.

I had installed joomla using softaculous, probably over an existing instakllation, not sure how it was installed first as it was my customers.
 

Brijesh-soft

Registered
Verifed Vendor
Aug 16, 2011
3
0
51
I did not change anything manually but I had to replace hostname with localhost to make it work.

I had installed joomla using softaculous, probably over an existing instakllation, not sure how it was installed first as it was my customers.
It could be possible that the existing configuration.php was not writable hence Softaculous could not create a new file. If you could open a support ticket with us we can check it for you.