当我重启MYSql服务器时,我创建了以下事件,用于向我的所有表添加外键约束,但是当我启动MYSql服务器时,它没有添加外键约束。
CREATE EVENT event1
ON SCHEDULE EVERY 1 S
DO begin
alter table cele_details add constraint cele_details_ibfk_1 foreign key(cid) references cele_names(cid) on delete cascade on update cascade;
alter table movie_ratings add constraint movie_ratings_ibfk_1 foreign key(mid) references movies(mid) on delete cascade on update cascade;
alter table movie_details add constraint movie_details_ibfk_1 foreign key(mid) references movies(mid) on delete cascade on update cascade;
alter table music_details add constraint music_details_ibfk_1 foreign key(music_id) references music(music_id) on delete cascade on update cascade;
end
我的活动有什么问题。