Fix: Cannot load from mysql.proc. The table is probably corrupted

Following from my dependency hell problems the other day my new version of MySQL seems to have all its stored procedures corrupted, displaying the following message when any of them are executed:

Cannot load from mysql.proc. The table is probably corrupted

After a bit of research, I found the simple fix is to run

mysql_upgrade

Problem solved.

Posting it to my blog as a reminder to me to RTFM, and just in case it is useful to some other poor soul out there.

Please help improve this blog and take a quick survey. Thanks!

  • http://www.google.com/profiles/ryanrhee90 Ryan Rhee

    You saved me hours of searching. Thanks! I just wish your hit was the top of the google results.
    -R

    • http://www.robsearles.com Rob Searles

      No probs, glad I helped

  • http://www.google.com/profiles/ryanrhee90 Ryan Rhee

    You saved me hours of searching. Thanks! I just wish your hit was the top of the google results.
    -R

  • Redhotchiliangel

    I am on of ‘other poor soul out there’ XD
    Thanks a lot, your help was very important.

    Bye!!
    Pako

    • http://www.robsearles.com Rob Searles

      Thanks Pako, always nice to know there is someone else out there struggling with the same problem!

  • Redhotchiliangel

    I am on of 'other poor soul out there' XD
    Thanks a lot, your help was very important.

    Bye!!
    Pako

  • http://www.robsearles.com Rob Searles

    No probs, glad I helped

  • http://www.robsearles.com Rob Searles

    Thanks Pako, always nice to know there is someone else out there struggling with the same problem!

  • http://imageneschidas.com.mx Guxo

    Thanks! It worked, I feel so good.

  • G Houde

     Hi Rob, my question will sound stupid but I’m new to MySQL, I’m used to MSSQL.  Who do I run mysql_upgrade.  I’m currently using PHPMyAdmin?

  • Anton

     Thank you, Rob

  • http://www.shakedos.com Shakedos

     Just took my words, I will publish your post on my blog, thanks ! 

  • Pingback: Fix: Cannot load from mysql.proc. The table is probably corrupted « Shaked Klein Orbach

  • http://www.blog.amrlima.info amrlima

    One more soul saved :D Glad I searched before starting to regret the upgrade :) .

  • MrT

    Thanx! This is what I needed :D

  • http://chris.improbable.org Chris Adams

    Thanks for documenting this – saved me some time

  • Chris Adams

    Thanks for documenting this – saved me some time

  • Guatenais

    Gracias, no sabia porque me daba el problema ;

  • Guatenais

    Gracias, no sabia porque me daba el problema ;

  • Jrcanelalopez

    Thank you very much.: Rob Searles. You are great!!! 

  • Jrcanelalopez

    Thank you very much.: Rob Searles. You are great!!!

  • Correodezippy

    only for unix?, but windows? :c

  • Correodezippy

    only for unix?, but windows? :c

  • Colins Jones

    Thanks for posting this, worked perfectly.

  • Colins Jones

    Thanks for posting this, worked perfectly.

  • Anik8z

    Hey Rob, thanks for the tip.. question – how do I run mysql_update in windows? How do I bring shell up.. thanks again!

  • Blynky

    Helped me too.  Many smooches upon you, sir.

  • Anik8z

    Hey Rob, thanks for the tip.. question – how do I run mysql_update in windows? How do I bring shell up.. thanks again!

  • Blynky

    Helped me too.  Many smooches upon you, sir.

  • Vynsynt

    FYI, working in OS X 10.7, running mysql_upgrade with out -p (and then entering the root password) throws a 1045 error, at least it did for me.
    mysql_upgrade -p is what fixed my install.

    Thanks for putting me on the right track Rob!

  • Vynsynt

    FYI, working in OS X 10.7, running mysql_upgrade with out -p (and then entering the root password) throws a 1045 error, at least it did for me.
    mysql_upgrade -p is what fixed my install.

    Thanks for putting me on the right track Rob!

  • Zmoerf

    Thank its work

  • Zmoerf

    Thank its work

  • Anthony Collini

    I’ve had this issue for a month and it has forced me to use a different machine for my development environment. If anyone could please help that would be great as I’m not able to run the above script. Any thoughts?

    I’ve tried running:
    mysql_upgrade;
    mysql_upgrade -p;
    mysql_upgrade -p  mypass;

    None of those have worked for me.

    I then entered the mysql console in Navicat and tried the above commands and none work either. I keep getting the error:

    “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘mysql_upgrade -p’ at line 1″

    Please help. Thank you.

    • http://www.facebook.com/profile.php?id=1304411002 Xavier Rodriguez

       mysql_upgrade -u root -ppassword

  • Anthony Collini

    I've had this issue for a month and it has forced me to use a different machine for my development environment. If anyone could please help that would be great as I'm not able to run the above script. Any thoughts?

    I've tried running:
    mysql_upgrade;
    mysql_upgrade -p;
    mysql_upgrade -p  mypass;

    None of those have worked for me.

    I then entered the mysql console in Navicat and tried the above commands and none work either. I keep getting the error:

    “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql_upgrade -p' at line 1″

    Please help. Thank you.

  • http://www.facebook.com/profile.php?id=1304411002 Xavier Rodriguez

    mysql_upgrade -u root -ppassword

  • http://www.facebook.com/profile.php?id=670816458 Sami Syed

    Thanks alot… greatly helped… I was suffering with this mysql error and couldnt backup my databases… Greatly appreciated

    http://qzombie.com :)

  • http://www.facebook.com/profile.php?id=670816458 Sami Syed

    Thanks alot… greatly helped… I was suffering with this mysql error and couldnt backup my databases… Greatly appreciated

    http://qzombie.com :)

  • http://05bit.com/rudyryk/ rudyryk

    Thank you! That helped :)

  • http://www.facebook.com/rudyryk Alexey Kinyov

    Thank you! That helped :)

  • http://www.facebook.com/djhell Daniele Brugnara

    with easyphp & windows
    start->run->cmd.exe
    cd c:easyphpmysqlbin
    mysql_upgrade.exe -u root -pPASSWORD

    Hope this helps

    • Jamie 0 Hart

      You sir are awesome. Thank you

  • http://www.facebook.com/djhell Daniele Brugnara

    with easyphp & windows
    start->run->cmd.exe
    cd c:easyphpmysqlbin
    mysql_upgrade.exe -u root -pPASSWORD

    Hope this helps

  • prett sons

    Hello Rob,

    The process that you have defined will surely work in all cases but I think after upgrade of MySQL database, all the information of old database get deleted. Do you have any other procedure to resolve this error without losing data?
     

  • prett sons

    Hello Rob,

    The process that you have defined will surely work in all cases but I think after upgrade of MySQL database, all the information of old database get deleted. Do you have any other procedure to resolve this error without losing data?

  • Pagondel

    i love you sooooo much =D!

  • Pagondel

    i love you sooooo much =D!

  • Mikko

    This can also be caused by a misformed query, I had this:
    SELECT COUNT (id) AS amount FROM posting_lists_queue WHERE id = “1″

    Should be: COUNT(id)
    NOT: COUNT (id)

    Older version of phpMyAdmin (3.3.9) returned mysql.proc error, newer version (3.4.7.1) returned error: “function table.COUNT does not exist”
    So double check your queries before trying anything else! :)

  • Mikko

    This can also be caused by a misformed query, I had this:
    SELECT COUNT (id) AS amount FROM posting_lists_queue WHERE id = “1″

    Should be: COUNT(id)
    NOT: COUNT (id)

    Older version of phpMyAdmin (3.3.9) returned mysql.proc error, newer version (3.4.7.1) returned error: “function table.COUNT does not exist”
    So double check your queries before trying anything else! :)

  • http://fernandoguillen.info Fernando Guillen

    works!

  • http://fernandoguillen.info Fernando Guillen

    works!

  • http://twitter.com/pappu687 Mahbubur Rahman

    Thanks man

  • http://twitter.com/pappu687 Mahbubur Rahman

    Thanks man

  • http://twitter.com/KindlenOnWeb KINDLEN

    I was getting this

    ERROR 1548 (HY000) at line 11529: Cannot load from mysql.proc. The table is probably corrupted

     error when importing stored procedure and functions from a mysqldump. I thought it was related to the file. 

    So  tried creating the functions and sp manual and I got :

    Cannot load from mysql.proc. The table is probably corrupted

    So I searched and found this article.

    Now all is fine and can import the mysqldump file.

    Big thank you.

    Regards,

    Simon

  • http://twitter.com/KindlenOnWeb KINDLEN

    I was getting this

    ERROR 1548 (HY000) at line 11529: Cannot load from mysql.proc. The table is probably corrupted

     error when importing stored procedure and functions from a mysqldump. I thought it was related to the file. 

    So  tried creating the functions and sp manual and I got :

    Cannot load from mysql.proc. The table is probably corrupted

    So I searched and found this article.

    Now all is fine and can import the mysqldump file.

    Big thank you.

    Regards,

    Simon

  • http://m1ke.me/ M1ke

    Tried this with EasyPHP on Windows. Didn’t work running the executable, I had to go into PowerShell and execute mysql_upgrade.exe -p to make it work. So, another heads up for anyone on Windows.

    Thanks for writing the article!

  • http://m1ke.me/ M1ke

    Tried this with EasyPHP on Windows. Didn't work running the executable, I had to go into PowerShell and execute mysql_upgrade.exe -p to make it work. So, another heads up for anyone on Windows.

    Thanks for writing the article!

  • Thenikoz

    Thanks! On debian:

    mysql-update –force -p

    cheers

  • Thenikoz

    Thanks! On debian:

    mysql-update –force -p

    cheers

  • Joris

    For those on MAMP (OS X), simply run this from Terminal (Applications/Utilities):

    sh /Applications/MAMP/bin/upgradeMysql.sh

  • Joris

    For those on MAMP (OS X), simply run this from Terminal (Applications/Utilities):

    sh /Applications/MAMP/bin/upgradeMysql.sh