This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
上面的评论线程摘要:错误的根源是这样的:
调用触发器的 MySQL 用户没有
database2.customers
表的 INSERT 权限。用户仅对存储clients
表的主数据库具有权限。触发器中执行的 SQL 语句中的错误会导致生成触发器的操作失败。
在 MySQL 用户被授予对
database2
中的表的 INSERT 权限后,错误停止并且问题得到解决。Summary of the comment thread above: that the origin of the error was this:
The MySQL user calling the trigger does not have INSERT privilege to the
database2.customers
table. The user only had privileges on the primary database, where theclients
table was stored.An error in an SQL statement executed in a trigger causes the action that spawned the trigger to fail.
After the MySQL user was granted INSERT privilege to tables in
database2
, the errors stopped and the issue was resolved.