Help us understand the problem. What is going on with this article?

AWS RDS MySQL で create function できるようにする

More than 3 years have passed since last update.

Amazon Web Service の RDS 上でのデフォルトでは、root であっても CREATE FUNCTION ... すると

You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

となり、CREATE FUNCTION ができない。

エラーメッセージに書いてある通り、log_bin_trust_function_creators を設定する。

設定値の確認

mysql> SHOW VARIABLES LIKE 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | OFF   |
+---------------------------------+-------+

設定

RDSダッシュボードにログイン

https://ap-northeast-1.console.aws.amazon.com/rds/home?region=ap-northeast-1#parameter-groups:

log_bin_trust_function_creators で検索

スクリーンショット 2016-03-04 10.02.53.png

「<エンジンのデフォルト>」となっているので、プルダウンで 「1」に変更

「変更のプレビュー」で内容を確認

スクリーンショット 2016-03-04 9.48.07.png

問題なければ、「閉じる」→「変更の保存」

RDSのリブートは不要、即時反映される

mysql> SHOW VARIABLES LIKE 'log_bin_trust_function_creators';
+---------------------------------+-------+
| Variable_name                   | Value |
+---------------------------------+-------+
| log_bin_trust_function_creators | ON    |
+---------------------------------+-------+
ytyng
torico
マンガに関わるWEBサービスを軸に、面白いと思えることを企画・開発している会社です。オタク文化が好きな人は是非一緒に働きましょう! Python3 / Vue.js(TypeScript) / Flutterで開発中!
https://www.torico-corp.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした