Fresh installation of SuiteCRM-7.11.22 fails -> Database error

At last step of installation I get a message:

Creating SuiteCRM configuration file (config.php)

Creating SuiteCRM application tables, audit tables and relationship metadata

Creating the database crm1fitm_SuiteCRM on localhost...done

......Database error. Please check suitecrm.log for details.

----------------------<

Environment:

PHP 8.0

(packages: libc-client, pear, php-bcmath, php-calendar, php-cli, php-common, php-curl, php-devel, php-fpm, php-ftp, php-gd, php-gettext, php-iconv, php-imap, php-intl, php-litespeed, php-mbstring, php-mysqlnd, php-pdo, php-posix, php-sockets, php-xml, php-zip, runtime)

MySQL 5.7.35

Apache 2.4.49

display_errors = Off
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 222M
post_max_size = 200M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php80"
upload_max_filesize = 20M
zlib.output_compression = Off

No Cron Jobs (at this stage)

Database user has all privileges in created database.

----------------------<

SuiteCRM: 7.11.22

Installation process step 2 of 2 I select:

→ Provide existing user

Host Name: localhost

(and other information)

Database Name, … User, … Password, …

----------------------<

begin error_log

[01-Oct-2021 10:46:01 UTC] PHP Fatal error: Uncaught Exception: SuiteCRM is not installed. Entry point needs an installed SuiteCRM, please install first. in /home/crm1test/public_html/include/entryPoint.php:59

Stack trace:

#0 /home/crm1test/public_html/index.php(47): require_once()

#1 {main}

thrown in /home/crm1test/public_html/include/entryPoint.php on line 59

[01-Oct-2021 10:46:02 UTC] PHP Warning: Trying to access array offset on value of type null in /home/crm1test/public_html/include/utils.php on line 1831

[01-Oct-2021 10:46:02 UTC] PHP Warning: Trying to access array offset on value of type null in /home/crm1test/public_html/include/utils.php on line 1785

[01-Oct-2021 10:46:11 UTC] PHP Warning: Trying to access array offset on value of type null in /home/crm1test/public_html/include/utils.php on line 1831

[01-Oct-2021 10:46:11 UTC] PHP Warning: Trying to access array offset on value of type null in /home/crm1test/public_html/include/utils.php on line 1785

[01-Oct-2021 12:29:24 UTC] PHP Fatal error: Uncaught Exception: Database error. Please check suitecrm.log for details. in /home/crm1test/public_html/include/utils.php:1892

Stack trace:

#0 /home/crm1test/public_html/include/database/DBManager.php(355): sugar_die('Database error....')

#1 /home/crm1test/public_html/include/database/DBManager.php(328): DBManager->registerError('Error creating ...', 'Error creating ...', true)

#2 /home/crm1test/public_html/include/database/MysqliManager.php(179): DBManager->checkError('Error creating ...', true)

#3 /home/crm1test/public_html/include/database/DBManager.php(676): MysqliManager->query('CREATE TABLE us...', true, 'Error creating ...')

#4 /home/crm1test/public_html/data/SugarBean.php(2175): DBManager->createTable(Object(Group))

#5 /home/crm1test/public_html/install/install_utils.php(1283): SugarBean->create_tables()

#6 /home/crm1test/public_html/install/performSetup.php(281): create_table_if_not_exist(Object(Group))

#7 /home/crm1test/public_html/install.php(827): require('/home/crm1fitme...')

#8 {main}

thrown in /home/crm1test/public_html/include/utils.php on line 1892

end error_log

----------------------<

begin install.log

2021-10-01 10:46:02...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 10:46:11...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 10:46:15...Begin System Check Process *************

2021-10-01 10:46:15...XML Parsing Support Found

2021-10-01 10:46:15...JSON Parsing Support Found

2021-10-01 10:46:15...MBString Support Found

2021-10-01 10:46:15...ZIP Support Found

2021-10-01 10:46:15.../custom directory and subdirectory check passed

2021-10-01 10:46:15...cache directory and subdirectory check passed

2021-10-01 10:46:15.../module directory and subdirectory check passed

2021-10-01 10:46:15.../upload directory check passed

2021-10-01 10:46:15.../zip check passed

2021-10-01 10:46:15...PCRE version check passed

2021-10-01 10:46:15...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 10:46:15...php.ini location found. /opt/cpanel/ea-php80/root/etc/php.ini

2021-10-01 10:46:15...Outputting HTML for System check

2021-10-01 10:46:15...No Errors were found *************

2021-10-01 10:46:15...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 10:46:33...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 12:15:33...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 12:15:37...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 12:29:00...Begin DB Check Process *************

2021-10-01 12:29:00...testing with mysql:mysqli

2021-10-01 12:29:00...Basic form info is valid, continuing Process.

2021-10-01 12:29:00...Testing user account...

2021-10-01 12:29:00...Connection made using host: localhost, usr: user

2021-10-01 12:29:00...SUCCESS:: no errors detected!

2021-10-01 12:29:00...End DB Check Process *************

2021-10-01 12:29:01...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 12:29:23...Begin DB Check Process *************

2021-10-01 12:29:23...testing with mysql:mysqli

2021-10-01 12:29:23...Basic form info is valid, continuing Process.

2021-10-01 12:29:23...Testing user account...

2021-10-01 12:29:23...Connection made using host: localhost, usr: user

2021-10-01 12:29:23...SUCCESS:: no errors detected!

2021-10-01 12:29:23...End DB Check Process *************

2021-10-01 12:29:24...installerHook: Info: custom/install/install_hooks.php not present, no custom hooks to execute

2021-10-01 12:29:24...calling handleSugarConfig()

2021-10-01 12:29:24...calling handleHtaccess()

2021-10-01 12:29:24...calling handleDbCreateDatabase()

2021-10-01 12:29:24...looping through all the Beans and create their tables

2021-10-01 12:29:24...processing table acl_actions

2021-10-01 12:29:24...creating table acl_actions

2021-10-01 12:29:24...creating Relationship Meta for ACLAction

2021-10-01 12:29:24...processing table acl_roles

2021-10-01 12:29:24...creating table acl_roles

2021-10-01 12:29:24...creating Relationship Meta for ACLRole

2021-10-01 12:29:24...processing table relationships

2021-10-01 12:29:24...creating table relationships

2021-10-01 12:29:24...creating Relationship Meta for Relationship

2021-10-01 12:29:24...processing table leads

2021-10-01 12:29:24...creating table leads

2021-10-01 12:29:24...creating Relationship Meta for Lead

2021-10-01 12:29:24...processing table cases

2021-10-01 12:29:24...creating table cases

2021-10-01 12:29:24...creating Relationship Meta for Case

2021-10-01 12:29:24...processing table bugs

2021-10-01 12:29:24...creating table bugs

2021-10-01 12:29:24...creating Relationship Meta for Bug

2021-10-01 12:29:24...processing table users

end install.log

----------------------<

begin suitecrm.log

Fri Oct 1 12:29:24 2021 [12839][-none-][FATAL] Mysqli_query failed.

Fri Oct 1 12:29:24 2021 [12839][-none-][FATAL] Error creating table: users: Query Failed: CREATE TABLE users (`id` char(36) NOT NULL ,`user_name` varchar(60) NULL ,`user_hash` varchar(255) NULL ,`system_generated_password` bool NULL ,`pwd_last_changed` datetime NULL ,`authenticate_id` varchar(100) NULL ,`sugar_login` bool DEFAULT '1' NULL ,`first_name` varchar(255) NULL ,`last_name` varchar(255) NULL ,`is_admin` bool DEFAULT '0' NULL ,`external_auth_only` bool DEFAULT '0' NULL ,`receive_notifications` bool DEFAULT '1' NULL ,`description` text NULL ,`date_entered` datetime NULL ,`date_modified` datetime NULL ,`modified_user_id` char(36) NULL ,`created_by` char(36) NULL ,`title` varchar(50) NULL ,`photo` varchar(255) NULL ,`department` varchar(50) NULL ,`phone_home` varchar(50) NULL ,`phone_mobile` varchar(50) NULL ,`phone_work` varchar(50) NULL ,`phone_other` varchar(50) NULL ,`phone_fax` varchar(50) NULL ,`status` varchar(100) NULL ,`address_street` varchar(150) NULL ,`address_city` varchar(100) NULL ,`address_state` varchar(100) NULL ,`address_country` varchar(100) NULL ,`address_postalcode` varchar(20) NULL ,`deleted` bool NULL ,`portal_only` bool DEFAULT '0' NULL ,`show_on_employees` bool DEFAULT '1' NULL ,`employee_status` varchar(100) NULL ,`messenger_id` varchar(100) NULL ,`messenger_type` varchar(100) NULL ,`reports_to_id` char(36) NULL ,`is_group` bool NULL ,`factor_auth` bool NULL ,`factor_auth_interface` varchar(255) NULL , PRIMARY KEY (id), KEY idx_user_name (user_name, is_group, status, last_name, first_name, id)) CHARACTER SET utf8 COLLATE utf8_general_ci: MySQL error 1071: Specified key was too long; max key length is 1000 bytes

end suitecrm.log

----------------------<

I would really appreciate if somebody can help me solve this problem.

Thank you.

Make sure MySQL is configured with the InnoDB storage engine.

I have this problem also. Those of us using Installatron have other limitations. If the tables need to be InnoDB should not the create statements have that specified? My default MySQL install has the InnoDB engine installed, it just so happens the default engine is MyISAM. I know the InnoDB engine works because I’ve created a database using it. However, a CREATE TABLE statement without the ENGINE specified will use the default.

I’m working with my hosting provider now to get the default changed. PHPMyAdmin won’t let me (as configured by my provider…)

  1. there should be clear statement that InnoDB storage engine is required

here

and here

  1. there should be a check during the installation process with clear label of InnoDB storage engine passed or failed

  2. more useful error in suitecrm.log

Mysqli_query failed.
Error creating table: users: Query Failed: CREATE TABLE users (…

Please put all this also in SuiteCRM 8 branch.

Thank you.