How to fix ERROR 1106: Unknown procedure in MySQL

MySQLINTERMEDIATEMEDIUMUpdated Dec 23, 2025ยท 113 views

ERROR 1106 occurs when MySQL cannot find the stored procedure you're trying to call. This happens when the procedure doesn't exist, hasn't been created in the current database, or the user lacks EXECUTE permissions.

Quick fix

Fixes 1106

SELECT * FROM information_schema.ROUTINES 
WHERE ROUTINE_NAME = 'your_procedure_name' 
AND ROUTINE_SCHEMA = DATABASE();
  1. Verify the procedure exists in the current database
  2. Check the exact procedure name and spelling
  3. Verify the current database context
  4. Check user privileges for the procedure
mysql โ€” error
SELECT * FROM information_schema.ROUTINES
WHERE ROUTINE_NAME = 'your_procedure_name'
AND ROUTINE_SCHEMA = DATABASE();
ERROR 1106: Unknown procedure

What this error means

MySQL Error 1106 (ER_UNKNOWN_PROCEDURE) is raised when the database server cannot locate or access a stored procedure referenced in a CALL statement. The error message displays "Unknown procedure '%s'" where %s is the name of the procedure that couldn't be found or accessed. This is a SQL syntax error (SQLSTATE 42000) that indicates the procedure doesn't exist in the database, hasn't been created yet, or the calling user lacks the necessary EXECUTE privilege to invoke it.

Typical symptoms

  • Application receives "ERROR 1106: Unknown procedure" when executing a CALL statement
  • Database operation fails with SQLSTATE 42000
  • Stored procedure invocation fails even though you're sure the procedure exists
  • Application crashes or returns unexpected results after database migration or backup restore
  • Different users or applications experience the error inconsistently

Common causes

  1. The stored procedure does not exist in the current database
  2. The procedure name is misspelled or uses incorrect casing
  3. The procedure was dropped or deleted from the database
  4. The user executing the CALL statement lacks EXECUTE privilege on the procedure
  5. The procedure exists in a different database or schema, and is not fully qualified
  6. After database migration or restore, procedures were not recreated or restored properly
  7. MySQL 8.0 specific: application is checking mysql.proc table which no longer exists in MySQL 8.0+

How to fix "ERROR 1106: Unknown procedure"

1Verify the procedure exists in the current database

Run this query to check if the procedure exists:

sql
SELECT * FROM information_schema.ROUTINES 
WHERE ROUTINE_NAME = 'your_procedure_name' 
AND ROUTINE_SCHEMA = DATABASE();

If no results are returned, the procedure does not exist in the current database. You need to create it using a CREATE PROCEDURE statement.

2Check the exact procedure name and spelling

MySQL procedure names are case-sensitive on Linux and case-insensitive on Windows by default. Verify:

sql
SHOW PROCEDURE STATUS WHERE Db = DATABASE();

This displays all procedures in the current database. Check that the procedure name matches exactly (including case) with what your application is trying to call.

3Verify the current database context

Ensure you're connected to the correct database:

sql
SELECT DATABASE();

If procedures are in a different database, qualify the call with the database name:

sql
CALL `database_name`.`procedure_name`(arguments);
4Check user privileges for the procedure

Verify the calling user has EXECUTE privilege on the procedure:

sql
SHOW GRANTS FOR CURRENT_USER;

Look for EXECUTE privilege. If missing, grant it using:

sql
GRANT EXECUTE ON `database_name`.`procedure_name` TO 'username'@'hostname';
FLUSH PRIVILEGES;
5Recreate the procedure if needed

If the procedure is missing or corrupted, recreate it from your backup or source code:

sql
DELIMITER //
CREATE PROCEDURE procedure_name (parameter_type parameter_name)
BEGIN
  -- Your procedure logic here
END//
DELIMITER ;

After creation, test with:

sql
CALL procedure_name();
6For MySQL 8.0: Update connection string

If upgrading from MySQL 5.7 to 8.0, MySQL no longer uses the mysql.proc table. The data dictionary now stores procedure information in mysql.routines and mysql.parameters (not directly queryable).

If using a connector or ORM that checks mysql.proc, update your connection string with:

bash
CheckParameters=false

For example in JDBC:

bash
jdbc:mysql://hostname:3306/database?CheckParameters=false

Advanced notes

Database Migrations: When restoring from backups, ensure stored procedures are included in the dump. Some backup tools allow filtering out stored procedures, resulting in this error after restore.

Schema Qualification: Different MySQL versions and configurations handle schema/database qualification differently. Always use fully qualified names in production code: database.procedure_name.

Privilege Propagation: Changes to privileges require a FLUSH PRIVILEGES command. If privileges were just granted, ensure this was executed.

Cross-Database Calls: Procedures in one database calling procedures in another database must use fully qualified names and the calling user must have EXECUTE privilege on both procedures.

Prepared Statements: If using prepared statements with CALL, ensure the procedure name is not parameterized - procedure names must be literal.

Frequently asked questions

What does "1106" mean?
MySQL Error 1106 (ER_UNKNOWN_PROCEDURE) is raised when the database server cannot locate or access a stored procedure referenced in a CALL statement. The error message displays "Unknown procedure '%s'" where %s is the name of the procedure that couldn't be found or accessed. This is a SQL syntax error (SQLSTATE 42000) that indicates the procedure doesn't exist in the database, hasn't been created yet, or the calling user lacks the necessary EXECUTE privilege to invoke it.
How do I fix "1106"?
ERROR 1106 occurs when MySQL cannot find the stored procedure you're trying to call. This happens when the procedure doesn't exist, hasn't been created in the current database, or the user lacks EXECUTE permissions.
What causes "1106"?
The stored procedure does not exist in the current database The procedure name is misspelled or uses incorrect casing The procedure was dropped or deleted from the database
Is the "1106" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading