Check if stored procedure exists MySQL

Run the below query to check if the stored procedure exists in a database in MySQL:

SELECT ROUTINE_NAME 
FROM INFORMATION_SCHEMA.ROUTINES 
WHERE 
       ROUTINE_NAME="<YourStoredProcedureName>" 
   AND 
   ROUTINE_SCHEMA="<YourDatabaseName>"

The query will return the name of stored procedure if the stored procedure exists in the database. If the stored procedure doesn’t exists then it will return no row in the output.