Doesnt accept DB user / DB name - stuck at step one

I know that I am entering the correct information but the SuitCRM wizard are persistently refusing to accept the DB user/DB name and the password. Connection is set to localhost.

We’re using PHP 7.3, MariaDB and SuiteCRM-7.11.10.zip package

2020-01-29 23:55:58...Begin DB Check Process *************
2020-01-29 23:55:58...testing with mysql:mysqli
2020-01-29 23:55:58...Basic form info is valid, continuing Process.
2020-01-29 23:55:58...Testing user account...
2020-01-29 23:55:58...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
2020-01-29 23:55:58...FATAL:: errors have been detected!  User will not be allowed to continue.  Errors are as follow:
2020-01-29 23:55:58..... 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
2020-01-29 23:55:58...End DB Check Process *************

I’ve tested a several different combinations both with the full db name eg. dbservername_dbname and just dbname and so forth. Nothing works.

We attempted several times and the result is always the same with the same errors.
We tested using different versions of PHP also to see if there was a difference in using a lower and older version. But it is not.

Isn’t there a config.php file or something where you just could add the information manually instead and then run the installation?

Well any suggestion that could help me solving this issue would be very appreciated. Thanks…

Are you using the standard port?

Did you check your mysqli module is installed in PHP and enabled in `php.ini?

Hi.
Yes everything is enabled in php and we’re using the standard ports of mariaDB. The installer fails on all our attempts to install SuiteCRM.

Hi,
it it possible that the user hasn’t enough privileges? Maybe its worth a try to create a new one with

CREATE USER 'username'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%';
flush privileges;

Edit: Also interesting: could you upload adminer.php and test the connection (it is basically like phpmyadmin, but just one single file) ?

Thank you so much for the suggestions.

We have tested the connection manually and it works fine. We also have other apps that use the database and we never had any issues, but with SuiteCRM it just doesn’t work.

The installer must be bugged when it comes to mysql/MariaDB. That’s at least our best guess.

In the files, you can see config.php on the root, where you can search for "db_" and you will see the DB settings used for your CRM.

Hi and thanks for the reply.

There is no such thing as a"config.php" in the SuiteCRM-7.11.10.zip download’s root.

I am guessing that the config files files are first created during the installation so that is why config.php do not exist yet?

Ok…
So we have finally figured out the issue after even more investigation and found the culprit.

The problem is that the DB user field doesn’t allow enough characters in that field, but it is a limited character field.

What creates the issue is that when you add the DB user details: hostname_dbusername (Note that hostname= webhotel name) It leaves very few characters left for the actual name for the database user.

in our case only two characters which is both stupid and silly:
Stupid because a username of two characters creates a poor security and silly because that field should not be limited in the first place. It seems pretty pointless and counter productive in our opinion.

We host and run our own servers, (so not shared web host server environment) but we use C-panel to partition the servers and company functions we run on them which creates a more secure segregated environments for all web apps we run.

Now C-panel requires that you specify as above with web host_dbuser/dbname or it will not allow access. This is also even worse because if you chosen a long name for your web-hotel it will not leave any characters left for the DBname at all in the SuiteCRM installation.

Is there some way to remove this field limitation so we can use longer usernames than just two characters?

Thanks.

This was supposedly fixed here

but that should already be part of your version :thinking:

Maybe there is a second limitation further down the road, when handling this text, but it is strange.

As a quick fix for you, I suggest trying out the silent installer. I am hoping this bug isn’t there…

Meanwhile, I’ll keep looking into this.

Thanks @pgr for the article !
But that is the password length, not the database username length which is the issue.

I think the title mentions the password field, but the actual code change is definitely about the user:

–> https://github.com/salesagility/SuiteCRM/pull/5112/files#diff-02c662891065aac5c88c655583879b6aL201

Do you have any maxLength parameter in your corresponding file?

No, the dbconfig.php file in the download zip package is completely different from the github one. Please see the screenshot below:

That should be similar to the one on the right, the full version is here: https://github.com/salesagility/SuiteCRM/blame/master/install/dbConfig_a.php

Anyway, that doesn’t have a character limit there. It must be somewhere else.

So I went looking and I guess this could be it:

Can you please try removing that from there and see if you can get it installed?

I foresee a possible problem, that the installer files are copied from the zip at the beginning of the install, so you might have to change the file that comes inside the zip package to get it to have any effect. It’s probably easier to just edit the HTML in the browser’s developer console.

Thank you very much @pgr

Well we threw in the towel and installed the system but with a 2 character username.
So it is up and running at least but is there a way to change the DBuser?

Is it just a matter of changing the name and passwords in the config.php file?

Thanks…

yes, you can change that now in the config.php file. First change it on your server and update the new values in the config.php to keep the connection up to date. You have passed the hurdle now. :slight_smile:

1 Like

Alright, thank you so much for your reply @cherub-chum and thank you too @pgr for all help which is very appreciated. :heart_eyes::+1: