Not the answer you need? Try our search, browse our categories, or register and ask your own question!

The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)

Why I am getting the below error only few procedures but not all procedures in mysql5.6 and mysql5.7?
mysql> show create PROCEDURE myDB.proc_test_delete_event\G
ERROR 1457 (HY000): Failed to load routine myDB.proc_test_delete_event. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
Can you please help me on this issue?

Answers

  • vaibhav_upadhyay40vaibhav_upadhyay40 Contributor Active Member Mentor
    @Naresh9999
    Below steps must help. 
    1) check table first mysql.proc
    2) check which proc is causing this issue
    3) recreate the proc and test.

    I faced this issue few days back and in my case there was one function which was causing this issue.
    All the procs related to 'abc' schema was referring to the 'abc.xyz' function and while making this call it was getting above error.
    Upon recreating the 'abc.xyz' function the issue got resolves.

    Test it in your non-prod environment, hope this helps.
  • Naresh9999Naresh9999 Active Member Contributor
    edited June 24
    Sure, Thank you @vaibhav_upadhyay40 , Let me check it and update you on the same.

  • vaibhav_upadhyay40vaibhav_upadhyay40 Contributor Active Member Mentor
    @Naresh9999
    I have faced this issue again,  managed to solve it by giving select access to mysql.proc to the user. Will keep you posted for the update.

     
  • Naresh9999Naresh9999 Active Member Contributor
    @vaibhav_upadhyay40 Thanks for the help.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.