AnsweredAssumed Answered

Cannot set up sugar PHP Fatal error Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException

Question asked by Autchara Chaiprom on Aug 1, 2018
Latest reply on Nov 8, 2018 by John Boyes

Do following this:

http://support.sugarcrm.com/Resources/Environments/Development_Environments/OSX_Development_Environment/ 

 

Not clean install set up, all source code is on git and I pulling to my local machine.

My apache is working, can run a php file.

I can connect to database via Sequel pro or Workbench

Apache 2.0

PHP version 5.6.30

All files permission 777

Sugar 7.9.1.0

install mysql 5.7 via Homebrew

running on Mac Seirra

dbconfig

'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',
),

 

Error from php error_log

PHP Fatal error:  Uncaught exception 'Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException' 
in /Users/_username_/Sites/sugar/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:166\nStack trace:\n
#0 /Users/_username_/Sites/sugar/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(847): Doctrine\\DBAL\\Driver\\Mysqli\\MysqliStatement->execute()\n
#1 /Users/_username_/Sites/sugar/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Portability/Connection.php(120): Doctrine\\DBAL\\Connection->executeQuery('SELECT category...', Array, Array, NULL)\n
#2 /Users/_username_/Sites/sugar/htdocs/src/Dbal/Connection.php(63): Doctrine\\DBAL\\Portability\\Connection->executeQuery('SELECT category...', Array, Array, NULL)\n
#3 /Users/_username_/Sites/sugar/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): Sugarcrm\\Sugarcrm\\Dbal\\Connection->executeQuery('SELECT category...', Array, Array)\n
#4 /Users/_username_/Sites/sugar/htdocs/mod in /Users/_username_/Sites/sugar/htdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 115

 

Seem like Sugar web app cannot connect to a database

Do you have any idea to fix this ?

 

Thanks,

M

Outcomes