cannot install SuiteCRM 7.8.9

I always have

checking sugarcrm.log I can see after every attempt similar string

Sun Jan  7 14:19:22 2018 [4860][-none-][FATAL] Could not connect to DB server localhost as ipopov. port 3307: No such file or directory

then I try to make test php file wih code below to test connection

<?php $mysqli = new mysqli("localhost:3307", "ipopov", "12345", "test"); $query = "SHOW TABLES"; if ($result = $mysqli->query($query)) { while ($row = $result->fetch_row()) { printf("%s
\n", $ $result->close();row[0]); } } $mysqli->close(); ?>

and this script gives me name of tables in DB test
What am I doing wrong?

Normally I don’t include any port in that “database” field. But it seems to be recognizing it correctly… only it doesn’t connect.

Can you do a test on the standard MySQL port, 3306, and specify just “localhost” on that field?

This is just a test to know if there is any bug with the handling of the port.

For reference:
https://github.com/salesagility/SuiteCRM/issues/4859

Thanks

this issue on github raised by me.
I did another test.
I install SugarCRM and compare config.php files. DB part are identical, but no connectio for SuiteCRM.

Did you try the standard port? I am convinced this might be a bug, I’m just trying to understand why it only happens to you…

I tried all solutions
localhost
localhost:3306
localhost:3307

There is always DB connection error.

Problem happens only on the system below:
Operating System and version: Linux DSHome 3.10.102 #15217 SMP Wed Dec 20 17:38:04 CST 2017 x86_64 GNU/Linux synology_bromolow_3615xs

This is Synology NAS.

Installation on local XAMPP server was ok.
Then I tried to move installed system with sql dump to Synology and again DB connection error.

This Synology has adopted package SugarCRM 6.5 which installed correctly withou any error.
Then I compare cofig of Sugar and Suite and ccannot find any difference. But Sugar works and Suite is not working.

SugarCRM 6.5.24 config file

  'dbconfig' => 
  array (
    'db_host_name' => 'localhost',
    'db_host_instance' => 'SQLEXPRESS',
    'db_user_name' => 'root',
    'db_password' => '***',
    'db_name' => 'sugarcrm',
    'db_type' => 'mysql',
    'db_port' => '',
    'db_manager' => 'MysqliManager',
  ),
  'dbconfigoption' => 
  array (
    'persistent' => true,
    'autofree' => false,
    'debug' => 0,
    'ssl' => false,
  ),

SuiterCRM 7.9.8 config file

  'dbconfig' => 
  array (
    'db_host_name' => 'localhost',
    'db_host_instance' => 'SQLEXPRESS',
    'db_user_name' => 'root',
    'db_password' => '***',
    'db_name' => 'crm',
    'db_type' => 'mysqli',
    'db_port' => '',
    'db_manager' => 'MysqliManager',
  ),
  'dbconfigoption' => 
  array (
    'persistent' => true,
    'autofree' => false,
    'debug' => 0,
    'ssl' => false,
    'collation' => 'utf8_general_ci',
  ),

Sugar is working and Suite gives me following error

( ! ) Fatal error: Uncaught Exception: Невозможно установить соединение с базой данных. Более подробная информация находится в файле suitecrm.log. in /volume1/web/crm/include/utils.php on line 1762
( ! ) Exception: Невозможно установить соединение с базой данных. Более подробная информация находится в файле suitecrm.log. in /volume1/web/crm/include/utils.php on line 1762
Call Stack
#	Time	Memory	Function	Location
1	0.0001	362512	{main}( )	.../index.php:0
2	0.0002	363224	require_once( '/volume1/web/crm/include/entryPoint.php' )	.../index.php:47
3	0.0067	1717256	DBManagerFactory::getInstance( )	.../entryPoint.php:179
4	0.0068	1748288	MysqliManager->connect( )	.../DBManagerFactory.php:147
5	0.0070	1748848	sugar_die( )	.../MysqliManager.php:290

And changing db_type from mysqli to mysql doesn’t change php error.

I’m scratching my head with this one, it’s really strange. The way SuiteCRM connects to the database is very standard, and it hasn’t had any major revision since the SugarCRM fork, there have been only small fixes.

Maybe you can try variations: different PHP version, different SQL modules in PHP, if possible… see if anything makes a difference.

Also this could be an issue to take up with the MySQL or Synology people, maybe it’s a known issue there.

Another alternative path for diagnosis (though it’s a lot of work) is to go back and try to install earlier SuiteCRM versions, to see if there’s a point where you are able to connect. Then you could see what changed from that version to the next and spot the problem.

Good luck and please report back what you find! Thanks

I am experiencing this very issue. Did you ever find the root cause and a solution to it?

I’m experiencing this same exact issue.

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

I have established the database, created the user, granted all permissions, specified the hostname as localhost. Running Apache 2.4 and php 7.0 on synology.

Any help would be greatly appreciated as I’m pulling my hair out.

Can you connect with phpMyAdmin or mysql command line?

Is SuiteCRM on the same server as MySQL?

Are you using nay non-standard ports? If so, how did you write this on the configuration screen?

I figured out the answer and this may help others when installing on a synology box. In order to finally connect, in the hostname you must put the ip address of the synology box, followed by your MariaDB port, which is 3307 for me and in most typical installations. So XX.XX.XX.XX:3307. Hope that help someone.