{"id":4537,"date":"2018-08-06T20:20:18","date_gmt":"2018-08-06T20:20:18","guid":{"rendered":"https:\/\/geekdecoder.com\/?p=4537"},"modified":"2018-08-06T20:20:18","modified_gmt":"2018-08-06T20:20:18","slug":"disable-only_full_group_by-in-mysql-on-ubuntu-16","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2018\/08\/06\/disable-only_full_group_by-in-mysql-on-ubuntu-16\/","title":{"rendered":"Disable ONLY_FULL_GROUP_BY in Mysql on Ubuntu 16"},"content":{"rendered":"<p>Recently I ran a command in mysql that resulted in this error:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmysql: &#x5B;ERROR] unknown variable &#039;sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&#039;\n<\/pre>\n<p>So I had to add a line to the mysql config file. In Ubuntu 16:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# nano \/etc\/mysql\/mysql.conf.d\/mysqld.cnf\n<\/pre>\n<p>Add the following line under mysqld<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n&#x5B;mysqld]\nsql_mode = &quot;STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&quot;\n\n<\/pre>\n<p>Restart mysql:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# systemctl restart mysql\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Recently I ran a command in mysql that resulted in this error: mysql: &#x5B;ERROR] unknown variable &#039;sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&#039; So I had to add a line to the mysql config file. In Ubuntu 16: # nano \/etc\/mysql\/mysql.conf.d\/mysqld.cnf Add the following line under mysqld &#x5B;mysqld] sql_mode = &quot;STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&quot; Restart mysql: # systemctl restart mysql<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70,117],"tags":[],"class_list":["post-4537","post","type-post","status-publish","format-standard","hentry","category-mysql","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=4537"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4537\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=4537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=4537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=4537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}