12
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MySQL5.7でONLY_FULL_GROUP_BYをOFFにする方法

Posted at

#MySQL5.7でONLY_FULL_GROUP_BYをオフにする方法

・MySQL5.7からはONLY_FULL_GROUP_BYのデフォルト設定がONになっていた為OFFにする方法をメモ

  1. /etc/my.cnf ファイルを編集
    以下の内容を記載しておく
    sql_mode=ONLY_FULL_GROUP_BY

  2. SQL文を実行
    以下のSQL文を実行
    SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

どちらかを実施後MYSQLを再起動する事で無事に設定がOFFになりました。

以上

12
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?