Connecting new CRM server to SQL Express server

Hi,

I am currently in the middle of building a new CRM server on windows server 2016 however when I am going through the setup stage I am unable to connect to the SQL Express server. I have created a database manually on sql and specified the correct name in the crm set up however i keep recieving an 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” any assistance would be greatly appreciated as this is my first real exposure to SQL and CRM.

Thank you.

Hi, welcome.

I am not sure that SQL Express is an option, I just know the full Microsoft SQL Server works. Any way, with a little Googling I gather that you’re not the first to try it, so let’s assume it’s possible.

If you don’t have a strict requirement to use the MS database I would advise you to switch to MySQL or MariaDB, even if you stick to the Windows server. These configurations are far more tested with SuiteCRM and it will probably save you some hassles.

If not, please tell me more specifically what you’re putting into each field in the installer.

If you’re using a name, not an IP, check that you have DNS resolution working for that name.

Hi

Thank you for you assistance, however eventually i ended up installing on a MariaDB but continued having all sorts of issues with certain pages not loading correctly so i have decided to start a fresh install from scratch.

Thank you.

Ok. Make sure you follow the installation instructions, and that you get the file permissions right.

I have built the new CRM server on server 2016. I am now trying to connect to the database on SQL server 14.0.2002 however the connection is consistently failing, I have confirmed that the server is allowing remote connections in the settings and i have tried both the host name and IP to connect along with numerous accounts to authenticate the only error i get on both the web page and install log file is “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.”
Is there any additional log files i would be able to check for more information on why this is failing as this error is very generic?

Thank you.

Yes, there are log files you could be checking, see this

https://pgorod.github.io/The-two-logs/

I have checked these log files and they do not appear to be giving me any additional help in troubleshooting the errors I am getting in the log files are.

[5000] [-none-] [FATAL] Could not connect to server

FATAL:: errors have been detected! User, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password.

Is there any additional troubleshooting I can do to resolve this?

Thank you.

  1. Is the SuiteCRM server (the PHP part) running on the same machine as the database?

  2. Regardless of the answer to 1., can you ping your database server IP from the command-line of the SuiteCRM server?

  3. If you are using a name and not an IP, do you have DNS resolution? Can you ping it by name?

Hi

  1. No the SuiteCRM server is not running on the same machine as the database. I have a separate SQL server in place.

  2. Yes I can ping the server IP from the SuiteCRM server.

  3. Yes I can ping the server name and it resolves to the correct server IP. I have tried connecting to the Database both by hostname and IP.

Thank you.

I think that leaves only firewall issues. If you can ping but you can’t connect to the SQL port, maybe your firewall is blocking it in one of the servers, or both.

On Windows I usually do this while troubleshooting:

netsh advfirewall set allprofiles state off

Do it on both servers. Then run your tests, if they work, it was the firewall that was blocking it.

Don’t forget to bring up the Firewall again:

netsh advfirewall set allprofiles state on

Oh, and make sure you also turn off any antiv-virus programs while testing this.

I have tried disabling the firewall and still no luck with connectivity.

Are you a developer?

That message seems to be ERR_DB_LOGIN_FAILURE which appears in a couple of places around this area

https://github.com/salesagility/SuiteCRM/blob/master/install/checkDBSettings.php#L139-L161

If you can add some extra logging or debugging code to see what the parameter look like?

Also if you can find some MySQL log telling exactly what went wrong with the connection, that would be quite useful.

I am not a developer, This is my first time getting involded in SQL and Databases along with Suite CRM.
I will see if I can get any additional information from the SQL server as to why the connection may be failing.

I have managed to get the suitecrm server to connect to the database.
I determined these was an error connecting to the sql server by trying to telnet to my server on port 1433 however this failed. I checked under configuration manager and all the settings appeared to be correct i disabled the TCP/IP protocol and reenabled it once this was done a connection was able to be made. Not exactly sure why the connection was unable to be made in the first place however it is working now thank you for your help.

I am glad you got it working! Sometimes network issues are hard to understand and debug.