How to stop a running procedure in MySQL?
I called a procedure in MySQL, but it is in an endless loop now! How to stop a running procedure in MySQL? The following is my procedure code：
drop procedure if exists my_proc; DELIMITER $$ CREATE PROCEDURE my_proc () BEGIN DECLARE VAR INT; SET VAR=0; WHILE VAR<10000 DO INSERT INTO my_table () VALUES (); END WHILE; END; $$ DELIMITER; CALL my_proc();
Connect to the server (or use phpmyadmin or something similar) and do:
Find the process causing trouble, note its ID and do:
- A Linux, Apache, MySQL, PHP (LAMP) stack is a combination of open source software that is typically installed together to enable a server to host dynamic […]
- MySQL is an the most popular open-source database management system, in most of hosting company its has been bundle by LAMP(Linux, Apache, MySQL, PHP/Python/Perl) stack. Another alternative […]
- MySQL is the world’s most popular open-source database. Despite its powerful features, MySQL is simple to set up and easy to use. Below are some instructions […]