LinHES Forums
http://forums.linhes.org/

innodb_table_stats not found
http://forums.linhes.org/viewtopic.php?f=21&t=24573
Page 1 of 1

Author:  Girkers [ Tue Oct 25, 2016 4:47 pm ]
Post subject:  innodb_table_stats not found

I was having some trouble with my frontends not loading and found that my backend had run out of space. Two of my mounted directories were full including my mysql partition.

My .err file was huge so I cleaned that out and then run optimize_mythtvdb.py to ensure my DB was all good. This has then generated more errors in the file, here is an extract:

Code:
2016-10-26 08:32:48 2070 [Note] Found 10299360 of 0 rows when repairing './mythconverg/recordedseek'
2016-10-26 08:33:11 7f9d1222e700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2016-10-26 08:33:11 7f9d1222e700 InnoDB: Error: Fetch of persistent statistics requested for table "mythconverg"."gallerymetadata" but the required system tables mysql.innodb_table_stats and mysql.innodb_in$
2016-10-26 08:33:11 7f9d1222e700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2016-10-26 08:33:11 7f9d1222e700 InnoDB: Error: Fetch of persistent statistics requested for table "mythconverg"."gallerymetadata" but the required system tables mysql.innodb_table_stats and mysql.innodb_in$
2016-10-26 08:33:11 7f9d1222e700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2016-10-26 08:33:11 7f9d1222e700 InnoDB: Error: Fetch of persistent statistics requested for table "mythconverg"."gallerymetadata" but the required system tables mysql.innodb_table_stats and mysql.innodb_in$
2016-10-26 08:33:12 7f9d1222e700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2016-10-26 08:33:12 7f9d1222e700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2016-10-26 08:33:12 7f9d1222e700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.


I did a search on the general error and found this article that apparently fixes it, but it is beyond my skill level:
http://stackoverflow.com/questions/15767652/mysql-error-table-mysql-innodb-table-stats-not-found

Like most people I would like to remove as many errors as possible thus the reason for my post. I would have created a bug but can't seem to find the right place to do this anymore.

Cheers

Author:  brfransen [ Fri Oct 28, 2016 8:18 am ]
Post subject:  Re: innodb_table_stats not found

I would not run that file link on Stack Overflow. It appears to create many tables that are not on my machines.

Have you checked the backups to see if maybe you have innodb_table_stats.frm & innodb_table_stats.ibd that you could just restore? Those should be at /data/srv/mysql/mysql/

Author:  Girkers [ Sun Oct 30, 2016 3:04 pm ]
Post subject:  Re: innodb_table_stats not found

Thanks brfransen,

There is no fear of me running that script, that is the reason I am here, to get the good oil.

I have checked the directory that you listed and the innodb files do not exist.I only have two files that have innodb in their name:
Code:
[root@vmmythtv mysql]# locate innodb
/usr/include/mysql/mysql/innodb_priv.h
/usr/share/mysql/innodb_memcached_config.sql


Checking my error file, the errors continue, the full error is:
Code:
2016-10-31 00:11:16 7fa6865f2700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2016-10-31 00:11:16 7fa6865f2700 InnoDB: Error: Fetch of persistent statistics requested for table "mythconverg"."websites" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.


I am noticing that in the same directory as my err file, there are three ib files, ibdata1, ib_logfile0 and ib_logfile1, these are 60mb, 50mb and 50mb respectively in size. I appreciate that databases use log files, but they seem a little big, is this related?

Author:  brfransen [ Sun Oct 30, 2016 4:59 pm ]
Post subject:  Re: innodb_table_stats not found

The error log sizes seem normal to me.

Do you not have a backup that have innodb_table_stats and innodb_index_stats? If not they I am thinking they are going to have to be recreated but I am not sure where they got created in the first place to verify the schema.

Author:  Girkers [ Sun Oct 30, 2016 5:08 pm ]
Post subject:  Re: innodb_table_stats not found

To give you a bit of history this is a clean 8.4 build on ESXi so I don't know .

I have checked one of my frontends and the two innodb tables are listed in the directly you have listed.

Is is possible to copy them from there?

Cheers

Author:  brfransen [ Mon Oct 31, 2016 6:59 am ]
Post subject:  Re: innodb_table_stats not found

Very odd. I just did a clean install in a VM and innodb_table_stats.frm, innodb_table_stats.ibd and innodb_index_stats.frm, innodb_index_stats.ibd exist.

I guess you could try copying them but I don't know what data would be in them from the other machine.

Author:  Girkers [ Thu Nov 03, 2016 4:31 pm ]
Post subject:  Re: innodb_table_stats not found

I just had another look around and found this article:

http://dba.stackexchange.com/questions/54608/innodb-error-table-mysql-innodb-table-stats-not-found-after-upgrade-to-mys

This article shows how to create the tables from scratch and suggests that it was a bug in MySQL 5.5 that is upgraded to 5.6.

The question is, can I safely ran the code in the URL to create the tables?

Cheers

Author:  brfransen [ Thu Nov 03, 2016 5:41 pm ]
Post subject:  Re: innodb_table_stats not found

Should be able to from mysql. Make a backup first. I would just do the innodb_table_stats and innodb_index_stats.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/