AnsweredAssumed Answered

Database error during fresh installation on Vagrant

Question asked by Tom Noel on Dec 20, 2017
Latest reply on Dec 20, 2017 by Matt Marum

I need help troubleshooting I just recently started receiving issues when trying to install sugar on my local vagrant machine.


During the installation screen in the web browser it gets to the last part which is the actual installation and errors out:

Creating Sugar configuration file (config.php)


Creating Sugar application tables, audit tables and relationship metadata
Creating the database wilson on localhost...done
.....................Database error. Please check sugarcrm.log for details.



I checked the sugarcrm.log and found:

Wed Dec 20 15:40:30 2017 [1922][-none-][FATAL] Error creating table: opportunities: Query Failed: CREATE TABLE opportunities ( NULL , PRIMARY KEY (id), KEY idx_opportunities_date_modfied (date_modified), KEY idx_opportunities_id_del (id, deleted), KEY idx_opportunities_date_entered (date_entered), KEY idx_opportunities_name_del (name, deleted), KEY idx_opp_name (name), KEY idx_opp_assigned_timestamp (assigned_user_id, date_closed_timestamp, deleted), KEY idx_opportunity_sales_status (sales_status), KEY idx_opportunity_opportunity_type (opportunity_type), KEY idx_opportunity_lead_source (lead_source), KEY idx_opportunity_next_step (next_step), KEY idx_opportunity_mkto_id (mkto_id), KEY idx_opportunities_assigned_del (assigned_user_id, deleted), KEY idx_opportunities_tmst_id (team_set_id)) CHARACTER SET utf8 COLLATE utf8_general_ci: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL , PRIMARY KEY (id), KEY idx_opportunities_date_modfied (date_modified), ' at line 1


Obviously the issue is that the query is not receiving any field definitions.  It is only receiving the table name, indices, & engine.  I tried troubleshooting this a little bit further by putting some logging statements in the ./include/database/MysqlManager.php file and found that all the tables prior to the opportunities table do in fact receive the field definitions, but when it gets to the opportunities the bean doesn't even have field definitions.


Does anyone have any steps I can do to further troubleshoot this?  I've already destroyed and rebuilt my vagrant box using the "sugarcrm/php71" box.  I've also tried using the "mmarum/sugar7-php56" box and a few different versions of sugar.  My host machine is a MacBook Pro macOS High Sierra Version 10.13.1 which I believe it was just recently upgraded to.



Tom Noel