A stored procedure is SQL the server already saved under a name. To run it from a desktop client you need that name in the schema tree, the parameter list, and a query tab that sends CALL. MySQL Workbench and HeidiSQL add a parameter window. TabulaSQL, a free MySQL and MariaDB client for macOS, Windows, and Linux, lists the procedure and runs the CALL you type.
Where the name shows up
Click the database in the object explorer after you connect. The tree loads tables and views. On a MySQL or MariaDB connection it also loads procedures, functions, triggers, and events. A PostgreSQL or SQLite connection does not list those groups. Routine tools stay on MySQL and MariaDB.
Procedures sit under a heading such as Procedures (4), after Tables and Views. The search box says Filter tables. That filter, including Search as Regex, narrows tables and views only, so scroll to the group.
Left-clicking a procedure name does not open a grid. Tables do that. Right-click the name for Alter Procedure (DDL in editor), Drop Procedure, and Refresh. Drop opens a dialog with a red heading, asks you to type the procedure name exactly, and sends DROP PROCEDURE. Refresh reloads names from information_schema.ROUTINES after a CREATE or DROP in another session. The refresh icon beside the filter reloads every expanded database.
Read the arguments from the DDL tab
Right-click the procedure and choose Alter Procedure (DDL in editor). The app runs SHOW CREATE PROCEDURE for that schema and name, pastes the statement into a new query tab, and adds a trailing semicolon. Treat that tab as the spec.
Read the parameter list for IN, OUT, and INOUT, and read the body to see whether it updates rows, selects rows, or both. A DEFINER=user@host clause means the routine runs with that account's privileges. Running this CREATE again can fail with error 1227 when your login cannot set a definer. Delete that clause and create the routine as yourself.
Send CALL from a query tab
Qualify the procedure. The database name at the right of the editor hint bar is the active schema, and it is easy to call the wrong one.
- Click the + beside the query tabs.
- Type
CALLshop.restock_product(42);with your schema, name, and literals. Quote string arguments, as inCALLshop.tag_order(42, 'rush');. - Press Run, or Ctrl+Enter. On a Mac the same shortcut is Cmd+Enter.
- Select the Messages tab under the grid. If you do not see it, click the history icon in the sidebar footer. The tooltip reads Show Messages tab. A successful line starts with the statement text, then rows affected and the time in milliseconds.
Safe mode is the lock in that footer. Its tooltip says writes ask for confirmation, and that check covers grid saves, inserts, deletes, and duplicates. Run is not part of that check, so CALL goes out immediately. Point the connection at a staging host when the procedure updates rows.
The Limit checkbox on that toolbar rewrites unlimited SELECT and WITH statements. It leaves CALL alone.
When the Data grid stays empty
Result rows show up only when the statement starts with SELECT, SHOW, DESCRIBE, DESC, EXPLAIN, WITH, ANALYZE, CHECK, CHECKSUM, OPTIMIZE, or REPAIR. CALL is not in that list. The server still runs the procedure. Messages reports rows affected. A SELECT inside the procedure is not drawn in the grid.
Copy that SELECT out of the DDL tab and run it with the same literals. If the procedure both updates and selects, run the CALL, then SELECT the table it changed.
OUT and INOUT parameters come back through user variables. Two statements in one script are enough:
CALL `shop`.`restock_product`(42, @left);
SELECT @left;
Rows in the grid come from the last statement. Because that one starts with SELECT, @left appears as a column.
Stored functions are the other shape. They are listed under Functions, and you do not CALL them. SELECT shop.double_it(21); returns a one-cell grid because the statement starts with SELECT.
| What you want | Statement | Where you read the outcome |
|---|---|---|
| Update or insert inside the procedure | CALL shop.restock_product(42); |
Messages, rows affected |
| An OUT parameter | CALL ...; SELECT @left; |
Data grid, last statement |
| A stored function | SELECT shop.double_it(21); |
Data grid |
Workbench and HeidiSQL collect each result set after their parameter window. Keep one of those when you need that grid. TabulaSQL fits when you already know the arguments.
Create a body this editor can send
Open Create from the database: right-click the name, choose Create, then Procedure. A new tab opens with this skeleton:
CREATE PROCEDURE `shop`.`new_procedure`()
BEGIN
END
Scripts split on semicolons outside quotes and comments. There is no DELIMITER command. Any semicolon inside BEGIN and END becomes a statement boundary, so the server receives a broken CREATE and then a stray END.
For a one-statement procedure, remove BEGIN and END and keep a single semicolon at the end:
CREATE PROCEDURE `shop`.`bump_qty`(IN wid INT)
UPDATE `shop`.`widgets` SET qty = qty + 1 WHERE id = wid;
Press Run. Then right-click the database and choose Refresh. bump_qty should appear under Procedures.
Several statements inside the body still belong in the mysql client: set DELIMITER //, run the full CREATE, then set the delimiter back and Refresh the tree. Pressing Run on the SHOW CREATE text splits the same way. Download TabulaSQL from https://tabulasql.com/download when you want the tree and the CALL tab.
See the name, still blocked on CALL
Error 1370 on CALL means the account lacks EXECUTE: execute command denied to user 'app'@'%' for routine 'shop.restock_product'. The sidebar can still list the name, because that list reads information_schema.ROUTINES. CREATE ROUTINE is separate, and you need it only to add a procedure. Grant the missing right with GRANT EXECUTE ON PROCEDURE shop.restock_product TO 'app'@'%', or grant EXECUTE on that database from the user manager. Account setup is in Create a MySQL user from a desktop GUI.
Wrong names, or a missing schema when the active database is not the owner, come back as error 1305. Qualify the call as database.procedure.
To copy the routine to another MySQL or MariaDB server, right-click the database and choose Copy Tables To. The wizard lists procedures next to the tables. Export Database on the same menu writes tables and views only. Use mysqldump with --routines when the file itself has to include the procedure. Dump choices are in Export a MySQL dump: GUI vs mysqldump.