Answers.Body: <p>Brad was correct in the comments above. The answer is the sql_mode. This is a duplicate of <a href="https://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by">Getting this SQL Error: GROUP BY incompatible with sql_mode=only_full_group_by</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-25T13:51:33.983Z
Answers.LastActivityDate: 2019-02-25T13:51:33.983Z
Answers.UserDisplayName: FuzzyJelly
Body: <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>I removed all of the tables and the standard craft install worked fine.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-14T01:16:31.253Z
Comments.Text: Possible duplicate of [Getting this SQL Error: GROUP BY incompatible with sql\_mode=only\_full\_group\_by](https://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by)
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-14T01:16:42.270Z
Comments.Text: This should get you sorted: https://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by
Comments.UserDisplayName: Brad Bell
Tags: <database><mysql><craft2>
Title: What is CDbException Error: SQLSTATE[42000]: Syntax error or access violation while moving a site to remote?
ThreadText: # What is CDbException Error: SQLSTATE[42000]: Syntax error or access violation while moving a site to remote?
  
  (Asked by: username_0 on 2019-02-14)
  
  > 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.
  
  **Tags:** database, mysql, craft2
  
  > **Comments:**
  > **username_1**: Possible duplicate of [Getting this SQL Error: GROUP BY incompatible with sql\_mode=only\_full\_group\_by](https://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by)  
  > **username_1**: This should get you sorted: https://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-02-25. Score: 1 | Accepted answer
  
  username_1 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](https://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by)
  
  
  ---
  
  