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.