Calling a REST API from a trigger or stored procedure in mysql?
问题 I want to call rest api in a POST method from a stored procedure or trigger in mysql server on windows. How do I perform this solely with MySQL? 回答1: You can use a mysql-udf-http and then create a trigger like this: delimiter $$ CREATE TRIGGER upd_check BEFORE UPDATE ON account FOR EACH ROW BEGIN IF NEW.amount > 0 THEN set @json = select json_object(account_id,amount) select http_post('http://restservice.example.com/account/post',@json); END IF; END;$$ delimiter; 回答2: Basically you can't. And