I am new to MySQL administration, and this week a customer came to me with a problem. They created an application with Wamp in a Windows Server environment.
For some reason when listing the tables in the MySQL Workbench, an error pops up saying could not be fetched
.
And in the output window, the following error is thrown:
They also reported that a stored procedure has disappeared, and when trying to compile it again in MySQL, another error is generated:
ERROR 1031 (HY000): Table storage engine for 'proc' doesn't have this option
Some tables were using the MyISAM engine, so I changed it and now all are as INNODB, and the ROW FORMAT parameters are like Do not Use.
Other information that may be important, this base was developed in a version 5.1, and this base with problems is in version 5.7.14.
UPDATE: I just tried to run mysqldump, to import on another server.
And this error was thrown:
d:\wamp64\bin\mysql\mysql5.7.14\bin>mysqldump.exe -u root --routines --all-data
bases --force > dump20170912.sql
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'bejarti'': Table s
torage engine for 'proc' doesn't have this option (1031)
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'berbigier'': Table
storage engine for 'proc' doesn't have this option (1031)
mysqldump: Got error: 1031: Table storage engine for 'proc' doesn't have this op
tion when using LOCK TABLES
mysqldump: Couldn't execute 'show create table `proc`': Table storage engine for
'proc' doesn't have this option (1031)
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'mysql'': Table sto
rage engine for 'proc' doesn't have this option (1031)
mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'new_schema'': Tabl
e storage engine for 'proc' doesn't have this option (1031)
Best Answer
In MySQL 5.6, five(5) InnoDB tables were introduced to the
mysql
schema. I mentioned and described those tables in my 4-year-old answer to the post InnoDB: Error: Table "mysql"."innodb_table_stats" not found after upgrade to mysql 5.6For MySQL 5.7, it went to 19.
Please note the remaining
mysql
tablesAs shown,
mysql.proc
(where stored procedures and functions are stored) is supposed to remain as MyISAM. I have mentioned these table counts before (see the subheading "CAVEAT FOR MySQL 5.6/5.7 users" in my answer Will hacking away ibdata1 destroy databases with only MyISAM tables?)LESSON HERE
You should never convert any table in the
mysql
schema into any storage engine. Changing them only made matters worse. The solution to this problem may have been as simple as executingREPAIR TABLE mysql.proc;
.