What is CDbException Error: SQLSTATE[42000]: Syntax error or access violation while moving a site to remote? CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #28 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'site.structureelements.root' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by.


The site is working locally through MAMP, and on a remote apache dev server. I have an nginx server built for shared hosting through Laravel Forge. All of the PHP settings are identical, and I used the database backup from the dev site.

I removed all of the tables and the standard craft install worked fine.
Brad was correct in the comments above. The answer is the sql_mode. This is a duplicate of Getting this SQL Error: GROUP BY incompatible with sql_mode=only_full_group_by