2
votes

I'm unable to create stored procedures in my cloud sql database due to the following error.

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

mysqlcheck reports all tables as OK.

repair table from within the mysql client produces the following:

mysql> REPAIR TABLE mysql.proc;

    +------------+--------+----------+-----------------------------------------------------------------------+
    | Table      | Op     | Msg_type | Msg_text                                                              |
    +------------+--------+----------+-----------------------------------------------------------------------+
    | mysql.proc | repair | Error    | Warning: '/sfs/pubzapimages/raptor1/data/mysql/proc.MYD' had -1 links |
    | mysql.proc | repair | status   | OK                                                                    |
    +------------+--------+----------+-----------------------------------------------------------------------+
    2 rows in set (0.02 sec)

    mysql> REPAIR TABLE mysql.proc;
    +------------+--------+----------+----------+
    | Table      | Op     | Msg_type | Msg_text |
    +------------+--------+----------+----------+
    | mysql.proc | repair | status   | OK       |
    +------------+--------+----------+----------+
    1 row in set (0.02 sec)

    mysql> REPAIR TABLE mysql.proc;
    +------------+--------+----------+-----------------------------------------------------------------------+
    | Table      | Op     | Msg_type | Msg_text                                                              |
    +------------+--------+----------+-----------------------------------------------------------------------+
    | mysql.proc | repair | Error    | Warning: '/sfs/pubzapimages/raptor1/data/mysql/proc.MYD' had -1 links |
    | mysql.proc | repair | status   | OK                                                                    |
    +------------+--------+----------+-----------------------------------------------------------------------+
    2 rows in set (0.01 sec)

With it repeatedly failing every other time.

Having researched the problem the consensus seems to be to run mysql_upgrade.
Note: This instance was not upgraded it was installed as a fresh 5.5. I downloaded mysqlserver onto a gce instance to get access to mysql_upgrade. When executing it I get the following:

Running 'mysql_fix_privilege_tables'...
ERROR 1227 (42000) at line 718: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
ERROR 1227 (42000) at line 726: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
ERROR 1227 (42000) at line 729: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
ERROR 1227 (42000) at line 742: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
ERROR 1290 (HY000) at line 1137: The MySQL server is running with the google option so it cannot execute this statement
FATAL ERROR: Upgrade failed 

It seems that mysql_upgrade is attempting to execute statements that are not supported on google cloud.

Any help/pointers would be greatly appreciated.

1
Have you had this issue later? And did you eventually find the real solution to this? I'm having exactly the same issue right now.yozh
The problem never reoccurred. Sorry I cannot be of more help.biffom

1 Answers

1
votes

This just started working soon after I posted the question.

Baffled as to why. All I did was to create another test database instance to see if I could replicate the problem - I could not - it worked just fine. I tried again in my previously failing database and now it too also worked.