| Showing entries 1 to 4 |
MySQL stored procedures are programs that are stored and can be executed on the MySQL server. Using MySQL Stored Procedure you can solve mysql related problem or task easily. Here I’m describing a stored procedure that I used to create some sample data. Read Full Article
MySQL stored procedures are programs that are stored and can be executed on the MySQL server. You can call stored procedure from any application over a distributed network. Stored procedures provide a means of interacting in a prescribed way with the database without placing any additional traffic on the network. Here I’m describing a stored procedure that I used to create some sample data.
To learn more about stored procedure checkout this link.
Suppose you may need to create a large number of dataset for a table and your table structure looks like this
CREATE TABLE IF NOT EXISTS `dictionary` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `word` varchar(100) NOT NULL, `mean`[Read more...]
It”s not the most common task in the world, but you might want to view processes from a particular user and once in a while you might even need to kill processes from a single user, be it during an attack or because you simply got a bug in an application bombarding your db server with connections!
Here is a small stored procedure which does exactly that!
call process_list("show","username","hostname");– shows all processes owned by username@hostname
call process_list("kill","username","hostname");– kills all processes owned by username@hostname
The code for this stored procedure can be found below. If you have any comments / suggestions feel free to comment below.
[Read more...]| Showing entries 1 to 4 |