[FIXED] Unable to connect to DB when installing it on shared host (netvirtue)

Hello, I’ve just downloaded and tried to install SuiteCRM-7.11.10 on my shared host I have through NetVirtue (has a wordpress and a couple of hand written sites running on it).

I’ve created the database and db_user through the cpanel interface but when running the install it fails, claiming the db host, username or password are incorrect.

First step of the install says the host passes all checks and is supported, but when I get to step two it fails.

It gets weirder though, I’ve checked, checked and checked the details and when I change the password (copy and paste in, so, it’s not actually different) the page doesn’t error, just cycles back to itself and I get the following in the install.log file:

2019-12-16 01:07:35...Begin DB Check Process *************
2019-12-16 01:07:35...testing with mysql:mysqli
2019-12-16 01:07:35...Basic form info is valid, continuing Process.
2019-12-16 01:07:35...Testing user account...
2019-12-16 01:07:35...Connection made using  host: 127.0.0.1, usr: slothsho_crm_nimda
2019-12-16 01:07:35...SUCCESS:: no errors detected!
2019-12-16 01:07:35...End DB Check Process *************
2019-12-16 01:07:35...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

and then if I hit next again (all details still in there) I get the error on the page:
The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password
and the following in the log:

2019-12-16 01:08:51...Begin DB Check Process *************
2019-12-16 01:08:51...testing with mysql:mysqli
2019-12-16 01:08:51...Basic form info is valid, continuing Process.
2019-12-16 01:08:51...Testing user account...
2019-12-16 01:08:51...ERROR::  The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password
2019-12-16 01:08:51...FATAL:: errors have been detected!  User will not be allowed to continue.  Errors are as follow:
2019-12-16 01:08:51..... The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password
2019-12-16 01:08:51...End DB Check Process *************

Which I find all very strange, here’s a video of the process if it helps clarify the above:
https://www.loom.com/share/f1b4bb54129b47b591db9e5bde26f343

One thing I noticed is the Scenario Selection gets reset too, I only want the first two, on the times it takes the password and refreshes the page it resets this selection to the default all, however, on the times it says the correct connection details are incorrect they stay.

I say correct database details, I’ve tried localhost, the domain and 127.0.0.1 and only the latter allows me to at least get that success message in the log - username and password are definitely correct (even tried changing the DB password incase it was too long) and copy/pasting them in (without trailing/leading spaces).

Uploaded all files over Filezilla, all folders are 755 and all files 644.

I’m fairly tech savvy, but a little stumped here? I’ve looked through the forum here and done a bit of googling but I can’t a solution that applies to me (for those threads with solutions).

Kind regards

Worked it out, I changed the way I provide DB Admin user account from “Same as Admin User” to “Provide Existing Account” and saw that it was truncating my db username to sixteen characters, adjust the db_account in cpanel to sixteen characters and it works fine now.

Might be something you want to look at increasing, I use longer account names and passwords for security, others may too.

1 Like