<p>I have tried the methods answered in this similar question:</p>

<p><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>

<p>To fix my issue all I did was edit this file:</p>

<pre><code>nano /etc/my.cnf
</code></pre>

<p>with the following line:</p>

<pre><code>sql_mode="NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES"
</code></pre>

<p>The website was back up and running instantly.</p>

CC BY-SA 4.0
2020-03-02T15:44:02.470Z
2020-03-02T15:44:02.470Z
MikeeeG
<p>I am getting the following error:</p>

<pre><code>Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #34 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'pottings_website.sources1.sortOrder' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
</code></pre>

<p>I have no idea how to fix it.</p>

<p>Its Craft 2.6.2911
PHP 5.6</p>

CC BY-SA 4.0
2020-03-02T15:16:05.327Z
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)
Romain P.
<craft2><mysql>
Craft Internal Server Error
# Craft Internal Server Error

(Asked by: username_0 on 2020-03-02)

I am getting the following error:
Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #34 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'pottings_website.sources1.sortOrder' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

I have no idea how to fix it.
Its Craft 2.6.2911
PHP 5.6

**Tags:** craft2, mysql
> **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)  

---

## 1 answers

### Answer by username_0 on 2020-03-02. Score: 2

I have tried the methods answered in this similar question:
Getting this SQL Error: GROUP BY incompatible with sql_mode=only_full_group_by
To fix my issue all I did was edit this file:
nano /etc/my.cnf

with the following line:
sql_mode="NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES"

The website was back up and running instantly.


---

