Trying to create a stored procedure, and getting a cryptic error like this?
ERROR 1307 (HY000): Failed to CREATE PROCEDURE <procName>
Try this simple diagnostic query first:
SELECT
IF(
COUNT(*) XOR (CAST(VERSION() AS decimal(2, 1)) >= 5.1),
'Wrong mysql.proc table version. Did you forget to run mysql_upgrade?',
'The mysql.proc table looks ok. Keep hunting.'
) AS troubleshooting
FROM
information_schema.columns
WHERE
table_schema = 'mysql'
AND table_name = 'proc'
AND column_name LIKE 'body_utf8';

Leave a Reply