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.
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.
Run this query to check if the procedure exists:
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.
MySQL procedure names are case-sensitive on Linux and case-insensitive on Windows by default. Verify:
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.
Ensure you're connected to the correct database:
SELECT DATABASE();If procedures are in a different database, qualify the call with the database name:
CALL `database_name`.`procedure_name`(arguments);Verify the calling user has EXECUTE privilege on the procedure:
SHOW GRANTS FOR CURRENT_USER;Look for EXECUTE privilege. If missing, grant it using:
GRANT EXECUTE ON `database_name`.`procedure_name` TO 'username'@'hostname';
FLUSH PRIVILEGES;If the procedure is missing or corrupted, recreate it from your backup or source code:
DELIMITER //
CREATE PROCEDURE procedure_name (parameter_type parameter_name)
BEGIN
-- Your procedure logic here
END//
DELIMITER ;After creation, test with:
CALL procedure_name();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:
CheckParameters=falseFor example in JDBC:
jdbc:mysql://hostname:3306/database?CheckParameters=falseDatabase 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.
ERROR 1064: You have an error in your SQL syntax
How to fix "ERROR 1064: You have an error in your SQL syntax" in MySQL
ERROR 1054: Unknown column in field list
Unknown column in field list
ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE (3589): RANGE frame requires numeric ORDER BY expression
RANGE frame requires numeric ORDER BY expression in MySQL window functions
CR_ALREADY_CONNECTED (2058): Handle already connected
How to fix "CR_ALREADY_CONNECTED (2058): Handle already connected" in MySQL
ER_WINDOW_DUPLICATE_NAME (3591): Duplicate window name
How to fix ER_WINDOW_DUPLICATE_NAME (3591) in MySQL window functions