New installation fails: partial tables built, but then claims cannot connect to dbms

I have had an older SuiteCRM installed and dropped everything to start fresh with 7.11.6.

Environment: PHP 7.2,20 (also tried 7.3), MySQL 5.7.26, CentOS 7

Installation begins, existing mysql database (via cPanel) and then reports:

Creating SuiteCRM configuration file (config.php)

Creating SuiteCRM application tables, audit tables and relationship metadata
Creating the database crmdb_current on localhost…done

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

The log shows

Sat Jul 13 22:56:23 2019 [29757][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:56:23 2019 [29757][-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
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL]  Query Failed: SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0: MySQL error 1146: Table 'crmdb_current.currencies' doesn't exist
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL]  Query Failed: SELECT * FROM fields_meta_data WHERE  custom_module='Users' AND  deleted = 0: MySQL error 1146: Table 'crmdb_current.fields_meta_data' doesn't exist
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL]  Query Failed: SELECT * FROM fields_meta_data WHERE  custom_module='Employees' AND  deleted = 0: MySQL error 1146: Table 'crmdb_current.fields_meta_data' doesn't exist
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL]  Query Failed: SELECT * FROM fields_meta_data WHERE  custom_module='UserPreferences' AND  deleted = 0: MySQL error 1146: Table 'crmdb_current.fields_meta_data' doesn't exist
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL]  Query Failed: SELECT * FROM fields_meta_data WHERE  custom_module='Administration' AND  deleted = 0: MySQL error 1146: Table 'crmdb_current.fields_meta_data' doesn't exist
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:57:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 22:58:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:58:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 22:59:02 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 22:59:02 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:00:02 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:00:02 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:01:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:01:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:02:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:02:01 2019 [3][-none-][FATAL]  Query Failed: SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0: MySQL error 1146: Table 'crmdb_current.currencies' doesn't exist
Sat Jul 13 23:02:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:02:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:03:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:03:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:04:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:04:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:05:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:05:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:06:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:06:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist
Sat Jul 13 23:07:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:07:01 2019 [3][-none-][FATAL]  Query Failed: SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0: MySQL error 1146: Table 'crmdb_current.currencies' doesn't exist
Sat Jul 13 23:07:01 2019 [3][-none-][FATAL] Mysqli_query failed.
Sat Jul 13 23:07:01 2019 [3][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table 'crmdb_current.config' doesn't exist

Some of the tables are, in fact, created. So DB connectivity isn’t the issue.

System Environment

PHP Version
7.2.20

XML Parsing
OK

MB Strings Module
OK

Writable SuiteCRM Configuration File (config.php)
OK

Writeable Custom Directory
OK

Writable Modules Sub-Directories and Files
OK

Writable Upload Directory
OK

Writable Data Sub-Directories
OK

Writable Cache Sub-Directories
OK

PHP Memory Limit
OK (256M)

ZLIB Compression Module
OK

ZIP Handling Module
OK

PCRE Library
OK

IMAP Module
OK

cURL Module
OK

Upload File Size
OK

Sprite Support
OK

PHP allows to use stream (upload://)
OK

Hi, sorry for this, you’re getting hit by this bug:

https://github.com/salesagility/SuiteCRM/issues/7509

There is a solution there, though it might not be too easy to apply manually because it’s some work to change the files that are inside the install zip.

I suggest you install the next version when it comes out (or the previous one, 7.11.5).

Thank you! I also tested from the error I got and did a search and found other systems with a similar mysql error (key too long) and changed the collation to general/ci and the default database to InnoDB that seemed to work, but I would rather do a clean install since I’m starting from scratch anyway.