質問編集履歴
1
再修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,46 +37,5 @@
|
|
37
37
|
|
38
38
|
上記のようになります
|
39
39
|
これの改善策をお教えください。
|
40
|
-
いろいろお世話になります
|
41
|
-
mysql8.0.18を使って勉強中です。
|
42
|
-
下記のコードを試すとエラーになります
|
43
|
-
```
|
44
|
-
drop table if exists posts;
|
45
|
-
create table posts (
|
46
|
-
id int unsigned primary key auto_increment,
|
47
|
-
title varchar(255),
|
48
|
-
body text
|
49
|
-
);
|
50
|
-
drop table if exists logs;
|
51
|
-
create table logs (
|
52
|
-
id int unsigned primary key auto_increment,
|
53
|
-
msg varchar(255)
|
54
|
-
);
|
55
|
-
|
56
|
-
drop trigger if exists posts_insert_trigger;
|
57
|
-
create trigger posts_insert_trigger after insert on posts for each row insert into logs (msg) values ('post added!');
|
58
|
-
|
59
|
-
|
60
|
-
insert into posts (title, body) values ('title 1', 'body 1');
|
61
|
-
insert into posts (title, body) values ('title 2', 'body 2');
|
62
|
-
insert into posts (title, body) values ('title 3', 'body 3');
|
63
|
-
|
64
|
-
select * from posts;
|
65
|
-
select * from logs;
|
66
|
-
|
67
|
-
show triggers;
|
68
|
-
|
69
|
-
```
|
70
|
-
|
71
|
-
dotinstall MySQL入門 » #32 トリガーを使ってみようの中で
|
72
|
-
|
73
|
-
mysql> create trigger posts_insert_trigger after insert on posts for each row insert into logs (msg) values ('post added!');
|
74
|
-
|
75
|
-
ERROR 1419 (HY000): 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)
|
76
|
-
|
77
|
-
上記のようになります
|
78
|
-
これの改善策をお教えください。
|
79
|
-
いろいろ検索しましたがよく理解できず
|
80
|
-
|
81
|
-
エラー1419(HY000):SUPER権限がなく、バイナリロギングが有効になっています
|
40
|
+
エラー1419(HY000):SUPER権限がなく、バイナリロギングが有効になっています
|
82
|
-
これを解決するにはどうすればよい
|
41
|
+
これを解決するにはどのようにすればよいですか?
|