Bug #67179 mysql system tables innodb_table_stats,slave_master_info not accessible on clean
Submitted: 10 Oct 2012 14:40 Modified: 28 Mar 2013 20:15
Reporter: Partha Dutta Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.6.7 OS:Linux (RHEL 6.2)
Assigned to: Arnaud Adant CPU Architecture:Any
Triage: Needs Triage: D1 (Critical)

[10 Oct 2012 14:40] Partha Dutta
Description:
After a complete new install (compiled from source code version) of 5.6.7, these error messages appear in the error log:

[pdutta] gq1-infra-003 data $ sudo cat /home/y/logs/mysql/mysqld.err
121010 14:31:13 [Warning] You need to use --log-bin to make --binlog-format work.
121010 14:31:13 InnoDB: The InnoDB memory heap is disabled
121010 14:31:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121010 14:31:13 InnoDB: Compressed tables use zlib 1.2.3
121010 14:31:13 InnoDB: Using Linux native AIO121010 14:31:13 InnoDB: CPU supports crc32 instructions
121010 14:31:13 InnoDB: Initializing buffer pool, size = 16.5G
121010 14:31:13 InnoDB: Completed initialization of buffer pool
121010 14:31:13 InnoDB: highest supported file format is Barracuda.
121010 14:31:14  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
121010 14:31:14 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_index_stats'. See http://dev.mysql.com/doc/
refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.

121010 14:31:14 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_index_stats"', ignored.
121010 14:31:14  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
121010 14:31:14 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/innodb_table_stats'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.

121010 14:31:14 [ERROR] InnoDB: Tablespace open failed for '"mysql"."innodb_table_stats"', ignored.
121010 14:31:14  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
121010 14:31:14 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_master_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.

121010 14:31:14 [ERROR] InnoDB: Tablespace open failed for '"mysql"."slave_master_info"', ignored.
121010 14:31:14  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
121010 14:31:14 [ERROR] InnoDB: Could not find a valid tablespace file for 'mysql/slave_relay_log_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.

At this point the server is unusable

How to repeat:
Remove all files in the mysql data dir and innodb datafiles & logfiles
sudo mysql_install_db --datadir=PATH_TO_DATA_DIR --basedir=PATH_TO_BASE_DIR
sudo mysqld_safe&
[10 Oct 2012 14:41] Partha Dutta
On server startup, these lines also appear in the error log file:

121010 14:33:54 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
121010 14:33:54 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
121010 14:33:54 [Note] Event Scheduler: Loaded 0 events
121010 14:33:54 [Note] /home/y/libexec64/mysqld: ready for connections.
Version: '5.6.7-rc-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

The items are pruned, but you get the point.
[10 Oct 2012 14:55] Partha Dutta
This may be a red herring, or a different issue all together. I think that if the memory allocator is changed other than the default, then these errors start showing up.
[10 Oct 2012 15:46] Peter Laursen
I get a simialr problem on Windows 7.  The server here is a completely fresh install with the 'stand alone' .msi intaller and configured with the "my-medium.ini" template file.

SELECT VERSION(); -- 5.6.7-rc  

SHOW FULL TABLES WHERE table_type = 'base table';
/*
...
innodb_index_stats         BASE TABLE  
innodb_table_stats         BASE TABLE  
ndb_binlog_index           BASE TABLE  
...
*/

SHOW CREATE TABLE innodb_table_stats;
/
Error CODE: 1146
TABLE 'mysql.innodb_table_stats' doesn't exist
*/
[10 Oct 2012 16:01] Peter Laursen
The tables innodb_table_stats and innodb_index_stats are InnoDB tables. As 'innodb_file_per_table' is ON as default on 5.6.7, .frm and .idb -files appear in the /datadir/MySQL folder.  

And it looks like InnoDB does not like InnoDB files in that folder!
[10 Oct 2012 16:04] Peter Laursen
.ibd, not .idb, I meant!

And BTW I forgot my signature here:

Peter
(not a MySQL/Oracle person)
[10 Oct 2012 16:08] Godofredo Miguel Solorzano
I can't repeat on CentOS 6.3 64-bits starting the server with defaults:

[miguel@CENTOS63 mysql-5.6.7]$ bin/mysql -uroot              
Welcome to the MySQL monitor.  Commands end with ; or \g.    
Your MySQL connection id is 4                                
Server version: 5.6.7-rc Source distribution                 

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SHOW FULL TABLES WHERE Tables_in_mysql like 'innodb%';
+--------------------+------------+
| Tables_in_mysql    | Table_type |
+--------------------+------------+
| innodb_index_stats | BASE TABLE |
| innodb_table_stats | BASE TABLE |
+--------------------+------------+
2 rows in set (0.00 sec)

mysql> SHOW CREATE TABLE innodb_table_stats\G
*************************** 1. row ***************************
       Table: innodb_table_stats
Create Table: CREATE TABLE `innodb_table_stats` (
  `database_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `n_rows` bigint(20) unsigned NOT NULL,
  `clustered_index_size` bigint(20) unsigned NOT NULL,
  `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`database_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0
1 row in set (0.00 sec)

mysql>

Please provide your my.cnf file. Thanks.
[10 Oct 2012 17:16] Peter Laursen
My error log contains (from last startup):

121010 17:40:21 [Warning] InnoDB: Cannot open table mysql/innodb_index_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121010 17:40:21 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121010 17:40:21 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121010 17:40:21 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121010 17:40:21 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121010 17:40:28 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121010 17:42:48 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

(and nothing in http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html that helps here as far as I can see.

Undoubtedly the .ibd files cannot be used while the .frm files can

I wonder if MySQL 5.5 is also affected with 'innodb_file_per_table')

How can a server version be released with such errors appearing in the error log? This is incredible. Checking error log startup messages should be the most basic testing IMO.
[10 Oct 2012 17:44] Godofredo Miguel Solorzano
@Peter: It's your install an upgrade? if yes from which version. I have a fres install and my log is:

121010 14:41:36 [Note] Plugin 'FEDERATED' is disabled.
121010 14:41:36 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
121010 14:41:36 InnoDB: The InnoDB memory heap is disabled
121010 14:41:36 InnoDB: Mutexes and rw_locks use Windows interlocked functions
121010 14:41:36 InnoDB: Compressed tables use zlib 1.2.3
121010 14:41:36 InnoDB: CPU does not support crc32 instructions
121010 14:41:36 InnoDB: Initializing buffer pool, size = 24.0M
121010 14:41:36 InnoDB: Completed initialization of buffer pool
121010 14:41:37 InnoDB: highest supported file format is Barracuda.
121010 14:41:37 InnoDB: 128 rollback segment(s) are active.
121010 14:41:37 InnoDB: Waiting for the background threads to start
121010 14:41:37 InnoDB: 1.2.7 started; log sequence number 1600069
121010 14:41:37 [Note] Server hostname (bind-address): '*'; port: 3306
121010 14:41:37 [Note] IPv6 is available.
121010 14:41:37 [Note]   - '::' resolves to '::';
121010 14:41:37 [Note] Server socket created on IP: '::'.
121010 14:41:37 [Warning] Failed to reset IPV6_V6ONLY flag (error: 10042). The server will listen to IPv6 addresses only.
121010 14:41:38 [Note] Event Scheduler: Loaded 0 events
121010 14:41:38 [Note] C:\Arquivos de programas\MySQL\MySQL Server 5.6\bin\mysqld: ready for connections.
Version: '5.6.7-rc'  socket: ''  port: 3306  MySQL Community Server (GPL)
121010 14:41:48 [Note] C:\Arquivos de programas\MySQL\MySQL Server 5.6\bin\mysqld: Normal shutdown

121010 14:41:48 [Note] Giving 0 client threads a chance to die gracefully
121010 14:41:48 [Note] Event Scheduler: Purging the queue. 0 events
121010 14:41:48 [Note] Shutting down slave threads
121010 14:41:48 [Note] Forcefully disconnecting 0 remaining clients
121010 14:41:48 [Note] Binlog end
121010 14:41:48 [Note] Shutting down plugin 'partition'
121010 14:41:48 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
121010 14:41:48 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
121010 14:41:48 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_FT_DELETED'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_FT_INSERTED'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_METRICS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_CMPMEM'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_CMP_RESET'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_CMP'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_LOCKS'
121010 14:41:49 [Note] Shutting down plugin 'INNODB_TRX'
121010 14:41:49 [Note] Shutting down plugin 'InnoDB'
121010 14:41:49 InnoDB: FTS optimize thread exiting.
121010 14:41:49 InnoDB: Starting shutdown...
121010 14:41:50 InnoDB: Shutdown completed; log sequence number 1600079
121010 14:41:50 [Note] Shutting down plugin 'BLACKHOLE'
121010 14:41:50 [Note] Shutting down plugin 'ARCHIVE'
121010 14:41:50 [Note] Shutting down plugin 'MRG_MYISAM'
121010 14:41:50 [Note] Shutting down plugin 'MyISAM'
121010 14:41:50 [Note] Shutting down plugin 'MEMORY'
121010 14:41:50 [Note] Shutting down plugin 'CSV'
121010 14:41:50 [Note] Shutting down plugin 'sha256_password'
121010 14:41:50 [Note] Shutting down plugin 'mysql_old_password'
121010 14:41:50 [Note] Shutting down plugin 'mysql_native_password'
121010 14:41:50 [Note] Shutting down plugin 'binlog'
121010 14:41:50 [Note] C:\Arquivos de programas\MySQL\MySQL Server 5.6\bin\mysqld: Shutdown complete

Thanks.
[10 Oct 2012 18:12] Peter Laursen
Mine is a completely fresh install of 5.6.7 using mysql-5.6.7-rc-winx64.msi - and cofigured with one of the 'templates' (as far as I remember 'my-medium.ini') with only port and possibly a few more configuration parameters changed.

After this http://bugs.mysql.com/bug.php?id=67041 I completely removed 5.5 and 5.6 (uninstalled from uninstall meny, deleted all files, and doublechecked in both ffile system and Registry that all related to 5.5 and 5.6 was gone) and did a fresh install of 5.5.28 and 5.6.7. 

On my system .ibd files in the /datadir/mysql data folder are not readable - or usable - by the server (but .frm files in same folder are). Error logs tells that data are not found 'thoug .frm files are existent'  SHOW TABLES finds the tables - but both SHOW CREATE TABLE and any SELECT ..FROM TABLE returns error that table (any InnoDB table in the `mysql`database) does not exist.

The server has 'innodb_file_per_table' = 1 (the new default from 5.6.7) 

The problem reported by original reporter here with P_S tables is not reproducible for me (P_S seems to work flawlessly here).  Maybe running mysql_upgrade will fix it for him, but he also tells he has a fresh install.  In that case this particular problem could be a packaging error with the Linux package he uses.
[10 Oct 2012 18:28] Peter Laursen
One coorection!  I remember now that I actaally configured using the config wizard shipping with 5.5.28 based on my-template.ini from 5.5.28 as well (I copied this file from 5.5.28 to 5.6.7 basedir - it would be easier actually if you dropped the stupid idea not not include teh config wizard with the 'standalone' installer').  Anyway this is my my.ini resulting from this (to be uploaded):
[10 Oct 2012 18:29] Peter Laursen
my.ini

Attachment: my.ini (application/octet-stream, text), 8.71 KiB.

[10 Oct 2012 18:34] Peter Laursen
Also see http://bugs.mysql.com/bug.php?id=67053 .  Explains how I changed one option in the 5.5. template to 'fit' 5.6 in order to use the config wizard after installing with mysql-5.6.7-rc-winx64.msi.

(@Miguel .. you already know all this - because I told you only one week ago! :-))
[10 Oct 2012 18:43] Peter Laursen
.. and dinally file system permissions on the .ibd files in /mysql folder seem to be OK. They are the same as .MYI and .MYD files in the folder have.
[10 Oct 2012 21:58] Peter Laursen
There are a few comments here that might help to conclude/resolve this: 
http://www.webyog.com/blog/2012/10/11/bummer/
[11 Oct 2012 17:49] Sveta Smirnova
Partha,

you wrote you compiled server from source.

Please provide configuration options you used.
[22 Oct 2012 10:00] Vasil Dimov
--- cut ---
[10 Oct 16:01] Peter Laursen

The tables innodb_table_stats and innodb_index_stats are InnoDB tables. As 'innodb_file_per_table' is ON as default on 5.6.7, .frm and .idb -files appear in the /datadir/MySQL folder. 
--- cut ---

Hmm, maybe this has something to do with case sensitive/insensitive filesystem and --lower-case-table-names. What filesystem and OS do you run?

Why is "MySQL" written with upper case letters? It should be all lowercase. Can you try to rename that directory to /datadir/MySQL -> /datadir/mysql and see if InnoDB will find its .ibd files?

Thanks!
[22 Oct 2012 10:46] Peter Laursen
If this was a question for me, it does not help.

I changed the path to use lowercase. Path is now C:\ProgramData\mysql\mysql server 5.6\data
(note that 'ProgramData' folder cannot be renamed to lowercase in Win7 - at least not from Windows Explorer)

SHOW CREATE TABLE `innodb_index_stats`;
-- Error Code: 1146
-- Table 'mysql.innodb_index_stats' doesn't exist
.. whereas SHOW TABLES lists `innodb_index_stats`

Also I think I had one comment in my blog from a Linux user experiencing the same.
[22 Oct 2012 13:12] Peter Laursen
Undoubtedly this http://bugs.mysql.com/bug.php?id=67261 is just a symptom of same:
http://bugs.mysql.com/bug.php?id=67261
[2 Nov 2012 19:59] Sveta Smirnova
I can not repeat described behavior as well.

Partha,

please in addition to your configure option, try following test:

1. Remove content of data/mysql/* directory
2. Record output of ls -la data/mysql
3. Run mysql_install_db script
4. Record output of ls -la data/mysql
5. Start MySQL Server

Please send us recorded output from steps 2 and 4 as well as your configuration file and configuration cmake options you used when built MySQL.

Peter,

since you are on Windows, you should not run mysql_install_db.

Could you please re-install 5.6.7 server and check content of its datadir and mysql directory right after installation, but before doing anything on the server. Which exact package do you use?
[2 Nov 2012 20:45] Peter Laursen
A comment ot "since you are on Windows, you should not run mysql_install_db". I never did. Why do you think so? Did I ever tell taht I did? 

Please do not consider me a complete idiot! There are enough of then in Oracle organization already IMHO! No need to add me to that company!

I made a clean install of 5.6.7 from the 'stand-alone' installer after installing 5.5.28 (as I have already described it)
[2 Nov 2012 21:14] Peter Laursen
I am sorry for my 'tone' in my last reply.

But I was upset by your assumption that I had neen running "mysql_install_db".  You know perfectly well that I am a Windows user that has absolutely no clue about Unix/Linux utilities. To me all such nonsense belongs to the previous century. How could you assume taht I did. 

Let me repeat how you should try to reproduce:

1) Have a system that has absolutely no trace of a previous 5.5 or 5.6 installation - if any ever was.  There may be 5.1 and older versions installed - it does not matter

2) Install MySQL 5.5.28 from the 'stand-alone' installer. Configure it with the bundled config wizard

3) Install MySQL 5.6.7 from the 'stand-alone' installer. Configure it with the my.ini I have posted to this report

4) PERIOD!!!

Did you try *exactly this*? Plase do not make assumptions that a different workflow is equal. Just TRY IT as I have described above (for the 3rd or 4th time)! Don't make assumptions.  Just follow the workflow as described.
[3 Nov 2012 7:24] Joshua Stouffer
I would like to add that I have been collaborating regarding identical issues on a 5.6.7 install as well.

We are working with Windows Server 2008 R2 x64 (virtualized on server hardware) as the mysqld host OS.

We too have started from scratch/clean install multiple times, each attempt also resulting in InnoDB tablespace and performance_schema errors in the log files, even immediately after [fresh, non-upgrade] install.

I don't have more details/logfiles at this time, but I felt it was relevant to share that we are experiencing what seems to be an identical issue.
[8 Nov 2012 5:29] Stephen Jackson
Also confirming said behaviour. Fresh install of MySQL 5.6.7 on Windows 7 64-Bit. Using packages from MySQL.com.
However, the problem extends beyond just innodb_index_stats

The following tables "do not exist"

slave_worker_info
slave_relay_log_info
slave_master_info
innodb_table_stats
innodb_index_stats

Its weird that some are having trouble reproducing this, as I have deleted and re-installed a number of times.

So to re-produce.

Install 5.6.7 on Win7 64Bit from official packages

mysqldump --all-databases --master-data foo > foo.sql

OR

use mysql; show create table [slave_worker_info|slave_relay_log_info|slave_master_info|innodb_table_stats|innodb_index_stats];

enjoy.....
[8 Nov 2012 5:31] Stephen Jackson
Also attaching relevant errorlog output

121105 21:46:36 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121105 21:46:36 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121105 21:46:36 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121105 21:46:36 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121105 21:46:36 [Warning] InnoDB: Cannot open table mysql/innodb_index_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
[8 Nov 2012 11:17] Erlend Dahl
We think we have nailed this down internally now. 

InnoDB Tables which are backed by *.IBD/*.FRM are not designed to be installed using "Simple File Copy" method. 

The MySQL system tables like innodb_table_stats, innodb_index_stats, etc are backed by InnoDB tables and the MSI installer was incidentially copying their corresponding *.IBD/*.FRM to install the system tables, hence queries against these tables were noticed to fail.

We are working on a fix, though I don't have an ETA for it yet.
[8 Nov 2012 16:47] Sveta Smirnova
Erlend,

thank you for the feedback.

I will mark this bug as "Verified" than.
[8 Nov 2012 16:48] Sveta Smirnova
Although I still wonder why Partha sees this on Linux.
[22 Nov 2012 12:14] Thierry de Villeneuve
Dear all,

Googling on this issue, I've found this thread. I guess I can participate with my own experience of this morning giving a try to MySQL 5.6. (using mysql-5.6.8-rc-linux2.6-x86_64.tar.gz)

I've tried to apply the same procedure I use when I install MySQL on my Linux systems. I never use the RPMs because I need fully independent instances. I always use the Linux Generic tar.gz.  Systems are RHEL 5.6.

After preparing my environment, creating all base dirs and a .cnf file, I run the mysql_install_db script.

Although the 'mysql_install_db' script works like a charm with 5.5, that one provided with 5.6 only causes problems. 

So far I've not been able to solve them all and therefore give up on 5.6. I'll wait until things clarifies a bit.

Thank you,
Thierry

Here is what I found :

 - One must NOT path the .cnf file as --default-files to mysql_install_db. The script jams and stops without errors after a few steps. Only pass 

  cd /appli/mysqlm02/mysql56/; ./scripts/mysql_install_db \
    --user=mysqlm02 \
    --basedir=/appli/mysqlm02/mysql56 \
    --datadir=/datadb/mysqlm02/DB56/mysql \
    --log-error=/datadb/mysqlm02/DB56/log/mysqld-error.log

 - The ibdata* data files created by mysql_install_db are corrupt and must be trashed before starting mysqld !

[ERROR] InnoDB: auto-extending data file /datadb/mysqlm02/DB56/mysql/ibdata1 is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 1024 pages, max 0 (relevant if non-zero) pages!

 - The mysql tablespace is corrupt and I don't know how to fix it (this is the object of this Ticket) !

 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| innodb_index_stats        |
| innodb_table_stats        |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
28 rows in set (0.00 sec)

mysql> SELECT * from slave_master_info;
ERROR 1146 (42S02): Table 'mysql.slave_master_info' doesnt exist
mysql> SELECT * FROM slave_relay_log_info;
ERROR 1146 (42S02): Table 'mysql.slave_relay_log_info' doesnt exist
mysql> SELECT * FROM slave_worker_info;
ERROR 1146 (42S02): Table 'mysql.slave_worker_info' doesnt exist
mysql> SELECT * FROM innodb_index_stats;
ERROR 1146 (42S02): Table 'mysql.innodb_index_stats' doesnt exist
mysql> SELECT * FROM innodb_table_stats;
ERROR 1146 (42S02): Table 'mysql.innodb_table_stats' doesnt exist

#> mysqlcheck --repair mysql slave_master_info ...
Warning: Using a password on the command line interface can be insecure.
mysql.slave_master_info
Error    : Table 'mysql.slave_master_info' doesn't exist
status   : Operation failed

#> ll /datadb/mysqlm02/DB56/mysql/mysql/*.frm
-rw-rw---- 1 mysqlm02 dba  8820 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/columns_priv.frm
-rw-rw---- 1 mysqlm02 dba  9582 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/db.frm
-rw-rw---- 1 mysqlm02 dba 10223 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/event.frm
-rw-rw---- 1 mysqlm02 dba  8665 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/func.frm
-rw-rw---- 1 mysqlm02 dba  8776 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/general_log.frm
-rw-rw---- 1 mysqlm02 dba  8700 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/help_category.frm
-rw-rw---- 1 mysqlm02 dba  8612 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/help_keyword.frm
-rw-rw---- 1 mysqlm02 dba  8630 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/help_relation.frm
-rw-rw---- 1 mysqlm02 dba  8770 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/help_topic.frm
-rw-rw---- 1 mysqlm02 dba 12982 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/innodb_index_stats.frm
-rw-rw---- 1 mysqlm02 dba  8830 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/innodb_table_stats.frm
-rw-rw---- 1 mysqlm02 dba  8898 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/ndb_binlog_index.frm
-rw-rw---- 1 mysqlm02 dba  8586 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/plugin.frm
-rw-rw---- 1 mysqlm02 dba  9996 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/proc.frm
-rw-rw---- 1 mysqlm02 dba  8875 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/procs_priv.frm
-rw-rw---- 1 mysqlm02 dba  8800 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/proxies_priv.frm
-rw-rw---- 1 mysqlm02 dba  8838 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/servers.frm
-rw-rw---- 1 mysqlm02 dba 10719 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/slave_master_info.frm
-rw-rw---- 1 mysqlm02 dba  9334 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/slave_relay_log_info.frm
-rw-rw---- 1 mysqlm02 dba  9230 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/slave_worker_info.frm
-rw-rw---- 1 mysqlm02 dba  9016 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/slow_log.frm
-rw-rw---- 1 mysqlm02 dba  8955 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/tables_priv.frm
-rw-rw---- 1 mysqlm02 dba  8636 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/time_zone.frm
-rw-rw---- 1 mysqlm02 dba  8624 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/time_zone_leap_second.frm
-rw-rw---- 1 mysqlm02 dba  8606 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/time_zone_name.frm
-rw-rw---- 1 mysqlm02 dba  8686 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/time_zone_transition.frm
-rw-rw---- 1 mysqlm02 dba  8748 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/time_zone_transition_type.frm
-rw-rw---- 1 mysqlm02 dba 10684 Nov 22 11:28 /datadb/mysqlm02/DB56/mysql/mysql/user.frm
[28 Nov 2012 5:28] Erlend Dahl
Bug#67595 is a duplicate of this bug.
[28 Nov 2012 10:02] Thierry de Villeneuve
Dear all,

Please. Can some help on how to get a fresh clean 5.6 system being successfully installed ?

I don't use an rpm. I use the Generic Linux tarball and proceed as described in INSTALL-BINARY. This is a fresh install, not an upgrade from 5.5.

Issue : After running ./scripts/mysql_install_db  two things happen (at least 2 as I'm stuck there):

 1/ ibdata* files generated by ./scripts/mysql_install_db are corrupt and must be deleted. mysqld_safe will create them Ok when run.

 2/ mysqld_safe reports that mysql/slave_master_info is corrupt. Atcually, the following 5 tables exist on disk but are corrupt. Because of this error I can not start Replication, my very purpose of switching to 5.6.

Question : Did anyone manage to get 5.6 up and running one day ?  What's the workaround to get these slave_% and %_stats table Ok (before the mysql_install_db script gets fixed) ?

Thank you,
Thierry

mysql> SELECT * from slave_master_info;
ERROR 1146 (42S02): Table 'mysql.slave_master_info' doesnt exist
mysql> SELECT * FROM slave_relay_log_info;
ERROR 1146 (42S02): Table 'mysql.slave_relay_log_info' doesnt exist
mysql> SELECT * FROM slave_worker_info;
ERROR 1146 (42S02): Table 'mysql.slave_worker_info' doesnt exist
mysql> SELECT * FROM innodb_index_stats;
ERROR 1146 (42S02): Table 'mysql.innodb_index_stats' doesnt exist
mysql> SELECT * FROM innodb_table_stats;
ERROR 1146 (42S02): Table 'mysql.innodb_table_stats' doesnt exist

121122 11:42:51 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.
com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
121122 11:42:51 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
121122 11:42:51 [ERROR] Error in checking mysql.slave_master_info repository info type of TABLE.
121122 11:42:51 [ERROR] Error creating master info: Error checking repositories.
121122 11:42:51 [ERROR] Failed to create or recover replication info repository.
121122 11:42:51 [Note] Check error log for additional messages. You will not be able to start replication until the issue is resolved and the server restarted.
[29 Nov 2012 17:48] Erlend Dahl
Sveta, are you able to reproduce the behaviour that Thierry sees?
[29 Nov 2012 17:59] Sveta Smirnova
Erlend,

not, I set it "Verified", because you commented it as InnoDB Team was able to nail it down.
[18 Dec 2012 19:22] Sveta Smirnova
Bug #66375 was marked as duplicate of this one.
[5 Feb 2013 2:36] Viney Ugave
I am having a similiar issue can anyone please help me with this :

InnoDB: Reading tablespace information from the .ibd files...
130204 19:20:28 [ERROR] InnoDB:  InnoDB: Error: Attempt to open a tablespace previously opened.
Previous tablespace cesdata/loginlog uses space ID: 2 at filepath: .\cesdata\loginlog.ibd
Cannot open tablespace mysql/innodb_index_stats which uses space ID: 2 at filepath: .\mysql\innodb_index_stats.ibd

InnoDB: Error: could not open single-table tablespace file .\mysql\innodb_index_stats.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

Can anyone please explain what is wrong with my database "cesdata"  ???
[5 Feb 2013 6:51] Erlend Dahl
Bug#68267 was marked as a duplicate.

The issue with the Windows installer has been fixed in 5.6.10, due to be relased shortly.
[7 Feb 2013 3:15] guo an
dont delete or modify ibdata1、ib_logfile0、ib_logfile1 and your db will work well.you can try it.
[7 Feb 2013 5:35] Chris Lim
I did a clean install of MySQL 5.6.10 (mysql-installer-community-5.6.10.0.msi) on Windows 7. This is the error log right after the installation.

2013-02-06 20:46:52 14564 [Note] Plugin 'FEDERATED' is disabled.
2013-02-06 20:46:52 35a8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2013-02-06 20:46:52 14564 [Note] InnoDB: The InnoDB memory heap is disabled
2013-02-06 20:46:52 14564 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-02-06 20:46:52 14564 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-02-06 20:46:52 14564 [Note] InnoDB: CPU does not support crc32 instructions
2013-02-06 20:46:52 14564 [Note] InnoDB: Initializing buffer pool, size = 103.0M
2013-02-06 20:46:52 14564 [Note] InnoDB: Completed initialization of buffer pool
2013-02-06 20:46:52 14564 [Note] InnoDB: Highest supported file format is Barracuda.
2013-02-06 20:46:54 14564 [Note] InnoDB: 128 rollback segment(s) are active.
2013-02-06 20:46:54 14564 [Note] InnoDB: Waiting for purge to start
2013-02-06 20:46:54 14564 [Note] InnoDB: 1.2.10 started; log sequence number 91374323
2013-02-06 20:46:54 14564 [Note] Server hostname (bind-address): '*'; port: 3307
2013-02-06 20:46:54 14564 [Note] IPv6 is available.
2013-02-06 20:46:54 14564 [Note]   - '::' resolves to '::';
2013-02-06 20:46:54 14564 [Note] Server socket created on IP: '::'.
2013-02-06 20:46:54 14564 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-06 20:46:54 14564 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
2013-02-06 20:46:54 14564 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-06 20:46:54 14564 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-06 20:46:54 14564 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.
2013-02-06 20:46:54 14564 [Note] Event Scheduler: Loaded 0 events
2013-02-06 20:46:54 14564 [Note] C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld: ready for connections.
Version: '5.6.10-log'  socket: ''  port: 3307  MySQL Community Server (GPL)
2013-02-06 20:49:36 14564 [Warning] InnoDB: Cannot open table mysql/innodb_index_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-06 20:49:49 14564 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-06 20:50:06 14564 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-06 20:50:18 14564 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-06 20:50:28 14564 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

In Mysql client, some mysql system tables listed don't exist:

Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.10-log MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| innodb_index_stats        |
| innodb_table_stats        |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
28 rows in set (0.00 sec)

mysql> describe innodb_index_stats;
ERROR 1146 (42S02): Table 'mysql.innodb_index_stats' doesn't exist
mysql> describe innodb_table_stats;
ERROR 1146 (42S02): Table 'mysql.innodb_table_stats' doesn't exist
mysql> describe slave_master_info;
ERROR 1146 (42S02): Table 'mysql.slave_master_info' doesn't exist
mysql> describe slave_relay_log_info;
ERROR 1146 (42S02): Table 'mysql.slave_relay_log_info' doesn't exist
mysql> describe slave_worker_info;
ERROR 1146 (42S02): Table 'mysql.slave_worker_info' doesn't exist
mysql>
[7 Feb 2013 8:06] Chris Lim
When I installed 5.6.10 on a Windows Server 2008's machine, I didnt experience the innodb system table errors I had previously on Windows 7. So, as for now, the latest stable version for Windows 7 is 5.5.30.
[7 Feb 2013 8:54] Chris Lim
replacement tables for Windows 7

Attachment: five-tables.sql (application/octet-stream, text), 6.37 KiB.

[8 Feb 2013 19:35] Viney Ugave
Anyways I recovered all my files this way ... this works great ..please try this : 

http://www.nerdydork.com/restoring-mysql-innodb-files-on-windows.html
[21 Feb 2013 9:47] Enrico Maria Carmona
[client]
port=3306
[mysql]
default-character-set=utf8
[mysqld]
port=3306
basedir="C:/mysql5/"
datadir="D:/dati/mysql5/data/"
tmpdir="D:/dati/mysql5/tmp/"
character-set-server=utf8
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=800
tmp_table_size=125M
max_heap_table_size=125M
thread_cache_size=38
myisam_max_sort_file_size=50G
myisam_sort_buffer_size=125M
key_buffer_size=10M
read_buffer_size=64K
innodb_flush_log_at_trx_commit=2
innodb_log_buffer_size=11M
innodb_buffer_pool_size=6G
innodb_buffer_pool_instances=4
innodb_log_file_size=1G
performance_schema = off
slow-query-log
long_query_time = 2
log-error = "D:/dati/mysql5/log/Error.log"
slow_query_log_file = "D:/dati/mysql5/log/SlowQuery.log"
skip-name-resolve
innodb_checksum_algorithm=strict_crc32

I got a lot of orror restoring from dump:

2013-02-20 15:58:51 e2c InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 15:58:51 e2c InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 15:58:51 e2c InnoDB: Error: Fetch of persistent statistics requested for table "ambulatoriale"."tb_annuale_cdg" 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.
2013-02-20 15:59:01 5f4 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 15:59:01 5f4 InnoDB: Recalculation of persistent statistics requested for table "ambulatoriale"."tb_annuale_cdg" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
2013-02-20 15:59:02 e2c InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
etc.

Using mysql run in lot of error and warning:

2013-02-20 18:50:28 b54 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 18:50:28 b54 InnoDB: Error: Fetch of persistent statistics requested for table "log"."log_transf_step" 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.
2013-02-20 18:50:28 b54 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 18:50:28 b54 InnoDB: Error: Fetch of persistent statistics requested for table "log"."log_transf_step_hist" 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.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/innodb_index_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

Running mysql_update failed.

Deleted 5 tables .frm and .ibd :
mysql/innodb_index_stats
mysql/innodb_table_stats
mysql/slave_master_info
mysql/slave_relay_log_info 
mysql/slave_worker_info 

dropped and recreated tables with sql five-tables.sql from [7 Feb 8:54] Chris Lim, restarted, all OK!

Thanks Chris!
[21 Feb 2013 9:50] Enrico Maria Carmona
ops, missing init comment :)

Hi all! 
I had a similiar issue, RESOLVED with sql five-tables.sql from [7 Feb 8:54] Chris Lim! Thanks!

I had a fresh install in Windows Server 2003 R2 (64 bit) Using a noinstall Zip Archive mysql-5.6.10-winx64.zip

Deleted ibdata* and ib_logfile*, no error on start.

My my.ini:
[client]
port=3306
[mysql]
default-character-set=utf8
[mysqld]
port=3306
basedir="C:/mysql5/"
datadir="D:/dati/mysql5/data/"
tmpdir="D:/dati/mysql5/tmp/"
character-set-server=utf8
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=800
tmp_table_size=125M
max_heap_table_size=125M
thread_cache_size=38
myisam_max_sort_file_size=50G
myisam_sort_buffer_size=125M
key_buffer_size=10M
read_buffer_size=64K
innodb_flush_log_at_trx_commit=2
innodb_log_buffer_size=11M
innodb_buffer_pool_size=6G
innodb_buffer_pool_instances=4
innodb_log_file_size=1G
performance_schema = off
slow-query-log
long_query_time = 2
log-error = "D:/dati/mysql5/log/Error.log"
slow_query_log_file = "D:/dati/mysql5/log/SlowQuery.log"
skip-name-resolve
innodb_checksum_algorithm=strict_crc32

I got a lot of orror restoring from dump:

2013-02-20 15:58:51 e2c InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 15:58:51 e2c InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 15:58:51 e2c InnoDB: Error: Fetch of persistent statistics requested for table "ambulatoriale"."tb_annuale_cdg" 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.
2013-02-20 15:59:01 5f4 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 15:59:01 5f4 InnoDB: Recalculation of persistent statistics requested for table "ambulatoriale"."tb_annuale_cdg" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.
2013-02-20 15:59:02 e2c InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
etc.

Using mysql run in lot of error and warning:

2013-02-20 18:50:28 b54 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 18:50:28 b54 InnoDB: Error: Fetch of persistent statistics requested for table "log"."log_transf_step" 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.
2013-02-20 18:50:28 b54 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-02-20 18:50:28 b54 InnoDB: Error: Fetch of persistent statistics requested for table "log"."log_transf_step_hist" 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.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/innodb_index_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
2013-02-20 18:50:28 2980 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

Running mysql_update failed.

Deleted 5 tables .frm and .ibd :
mysql/innodb_index_stats
mysql/innodb_table_stats
mysql/slave_master_info
mysql/slave_relay_log_info 
mysql/slave_worker_info 

dropped and recreated tables with sql five-tables.sql from [7 Feb 8:54] Chris Lim, restarted, all OK!

Thanks Chris!
[5 Mar 2013 1:15] Venu Anuganti
I had the similar issue with 5.6.10 on a fresh install when used with mysql_install_db as it keeps on failing to bootstrap the system tables by complaining about missing innodb tables.

The fix is to pass --datadir and --user=mysql explicitly to mysql_install_db; even though the defaults /etc/my.cnf had everything including user=mysql in [mysqld] section

Here is the log of steps

[root@stats01 mysql]# rm -rf /data01/mysql/* /data01/logs/*
[root@stats01 mysql]# egrep "datadir|user" /etc/my.cnf
user                            = mysql
datadir                         = /data01/mysql
[root@stats01 mysql]# mysql_install_db > /dev/null 2>&1
[root@stats01 mysql]# ls -al
total 804872
drwxr-xr-x 2 mysql mysql      4096 Mar  4 17:08 .
drwxr-xr-x 4 root  root       4096 Mar  4 15:13 ..
-rw-rw---- 1 mysql mysql  18874368 Mar  4 17:08 ibdata1
-rw-rw---- 1 mysql mysql 268435456 Mar  4 17:08 ib_logfile0
-rw-rw---- 1 mysql mysql 268435456 Mar  4 17:08 ib_logfile1
-rw-rw---- 1 mysql mysql 268435456 Mar  4 17:08 ib_logfile2
[root@stats01 mysql]# grep ERROR /data01/logs/error.log
ERROR: 1146  Table 'mysql.innodb_table_stats' doesn't exist
2013-03-04 17:08:33 32683 [ERROR] Aborting

[root@stats01 mysql]# mysql_install_db --datadir=/data01/mysql --user=mysql > /dev/null 2>&1
[root@stats01 mysql]# ls -al
total 804884
drwxr-xr-x 5 mysql mysql      4096 Mar  4 17:06 .
drwxr-xr-x 4 root  root       4096 Mar  4 15:13 ..
-rw-rw---- 1 mysql mysql  18874368 Mar  4 17:06 ibdata1
-rw-rw---- 1 mysql mysql 268435456 Mar  4 17:06 ib_logfile0
-rw-rw---- 1 mysql mysql 268435456 Mar  4 17:05 ib_logfile1
-rw-rw---- 1 mysql mysql 268435456 Mar  4 17:05 ib_logfile2
drwx------ 2 mysql mysql      4096 Mar  4 17:06 mysql
drwx------ 2 mysql mysql      4096 Mar  4 17:06 performance_schema
drwx------ 2 mysql mysql      4096 Mar  4 17:06 test

[root@stats01 mysql]# ls && ls mysql/ | head -1
ibdata1  ib_logfile0  ib_logfile1  ib_logfile2  mysql  performance_schema  test
columns_priv.frm

So, the problem still exists in mysql_install_db script.
[11 Mar 2013 16:20] Arnaud Adant
This seems to be a bug.

The workaround in case it happens it to remove the ibd files (and the associated frm, not all frms of course), then run the 5.6.10 mysql_upgrade executable to re-create the missing tables.
[28 Mar 2013 18:21] Arnaud Adant
This bug has been fixed for the Windows part in 5.6.10.

"

The issue with the Windows installer has been fixed in 5.6.10, due to be
relased shortly.

"

But for the Linux part, it needs feedback as I could not reproduce from source in RHEL5. The explanation is that some configuration file is used when mysql_install_db is run. And the configuration is modified before the MySQL server is started.

If anyone has a test case to reproduce on a clean server, please update this bug. Otherwise it will be re-closed.
[28 Mar 2013 18:53] Thierry de Villeneuve
Hello Arnaud

Are the test cases I've posted on 22 Nov 2012 (follow up 28 Nov 2012) are not sufficient enough ?

Please let me know what you would want me to do today. I'll try it.

Rgds,
Thierry
[28 Mar 2013 19:12] Arnaud Adant
Hello Thierry,

Yes, it is enough !

At the moment when you posted the comment, I had verified this bug for Unix.

the problem comes from mysql_install_db without arguments.

This script is run like this for RPM installs.

In 5.5, it used the values in /etc/my.cnf normally in this order given by 

mysql --help

"
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
"

This is the order mysqld expected when it starts. If mysql_install_db finds
the datadir variable, it will install the data there.

For my test, I created a file called /etc/my.cnf having /tmp/data as datadir :

mysqld will consider it when starting :

/tmp/mysql-5.5.29-linux2.6-x86_64$ bin/mysqld --print-defaults
bin/mysqld would have been started with the following arguments:
--datadir=/tmp/data

After running mysql_install_db in 5.5,

ls -al /tmp/data/
total 110736
drwxr-xr-x 5 aadant common     4096 Mar 28 19:49 .
drwxrwxrwt 9 root   root       4096 Mar 28 19:55 ..
-rw-rw---- 1 aadant common       56 Mar 28 19:41 auto.cnf
-rw-rw---- 1 aadant common 12582912 Mar 28 19:41 ibdata1
-rw-rw---- 1 aadant common 50331648 Mar 28 19:41 ib_logfile0
-rw-rw---- 1 aadant common 50331648 Mar 28 19:41 ib_logfile1
drwx------ 2 aadant common     4096 Mar 28 19:49 mysql
drwx------ 2 aadant common     4096 Mar 28 19:49 performance_schema
drwx------ 2 aadant common     4096 Mar 28 19:48 test

In 5.6, mysql_install_db ignores the /etc/my.cnf and creates the data files in basedir/data.

while it keeps using /etc/my.cnf as primary configuration file :

/tmp/mysql-5.6.10-linux-x86_64$ bin/mysqld --print-defaults
bin/mysqld would have been started with the following arguments:
--datadir=/tmp/data

after running mysql_install_db in 5.6 :

/tmp/mysql-5.6.10-linux-x86_64$ ls -al data
total 110732
drwxr-xr-x  5 aadant common     4096 Mar 28 20:07 .
drwxr-xr-x 13 aadant common     4096 Mar 28 20:07 ..
-rw-rw----  1 aadant common 12582912 Mar 28 20:07 ibdata1
-rw-rw----  1 aadant common 50331648 Mar 28 20:07 ib_logfile0
-rw-rw----  1 aadant common 50331648 Mar 28 20:07 ib_logfile1
drwxr-xr-x  2 aadant common     4096 Mar 28 20:07 mysql
drwx------  2 aadant common     4096 Mar 28 20:07 performance_schema
drwxr-xr-x  2 aadant common     4096 Mar 28 20:07 test

and /tmp/data is not touched.

so the issue is the change of behavior in mysql_install_db. I open a new bug for this and close this bug linked to different causes (windows and unixes).
[28 Mar 2013 19:32] Arnaud Adant
Thierry,

The solution to the problem is to pass the configuration file you created to mysql_install_db :

./scripts/mysql_install_db --defaults-file=/etc/my.cnf

if /etc/my.cnf is the configuration file you created.

Make sure that the datadir is empty before you run mysql_install_db !

To check where the datadir is located, just run

bin/mysqld --print-defaults

bin/mysqld would have been started with the following arguments:
--datadir=/tmp/data
[28 Mar 2013 20:15] Arnaud Adant
I created this bug for the mysql_install_db issue related to /etc/my.cnf 

http://bugs.mysql.com/bug.php?id=68807

closing this bug for the Unix part.
[7 Jun 2013 9:48] Cyril Scetbon
We have a similar error after having upgraded mysql 5.5 to 5.6 :

2013-06-07 11:41:08 7f61b06b9700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2013-06-07 11:41:08 7f61b06b9700 InnoDB: Error: Fetch of persistent statistics requested for table "ourdb"."ourtable" 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.
[23 Jan 2014 17:09] JKjsdk Ldsfji8
I'm running into this bug on Windows 2012 x64, MySQL 5.6.11.

2014-01-23 07:56:18 7952 [Note] C:/Program Files/MySQL/MySQL Server 5.6/bin\mysqld: Shutdown complete

2014-01-23 07:56:28 13684 [Note] Plugin 'FEDERATED' is disabled.
2014-01-23 07:56:28 13684 [Warning] option 'innodb-autoextend-increment': unsigned value 1024 adjusted to 1000
2014-01-23 07:56:28 1504 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2014-01-23 07:56:28 13684 [Note] InnoDB: The InnoDB memory heap is disabled
2014-01-23 07:56:28 13684 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-01-23 07:56:28 13684 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-01-23 07:56:28 13684 [Note] InnoDB: Not using CPU crc32 instructions
2014-01-23 07:56:28 13684 [Note] InnoDB: Initializing buffer pool, size = 135.0M
2014-01-23 07:56:28 13684 [Note] InnoDB: Completed initialization of buffer pool
2014-01-23 07:56:28 13684 [Note] InnoDB: Highest supported file format is Barracuda.
2014-01-23 07:56:29 1504  InnoDB: Operating system error number 2 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2014-01-23 07:56:29 13684 [ERROR] InnoDB: Could not find a valid tablespace file for 'pmtest/slave_master_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2014-01-23 07:56:29 13684 [ERROR] InnoDB: Tablespace open failed for '"pmtest"."slave_master_info"', ignored.
2014-01-23 07:56:29 1504  InnoDB: Operating system error number 2 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2014-01-23 07:56:29 13684 [ERROR] InnoDB: Could not find a valid tablespace file for 'pmtest/slave_relay_log_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2014-01-23 07:56:29 13684 [ERROR] InnoDB: Tablespace open failed for '"pmtest"."slave_relay_log_info"', ignored.
2014-01-23 07:56:29 1504  InnoDB: Operating system error number 2 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2014-01-23 07:56:29 13684 [ERROR] InnoDB: Could not find a valid tablespace file for 'pmtest/slave_worker_info'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2014-01-23 07:56:29 13684 [ERROR] InnoDB: Tablespace open failed for '"pmtest"."slave_worker_info"', ignored.
2014-01-23 07:56:29 13684 [Note] InnoDB: 128 rollback segment(s) are active.
2014-01-23 07:56:29 13684 [Note] InnoDB: Waiting for purge to start
[23 Jan 2014 17:10] JKjsdk Ldsfji8
Sorry for the duplicate posts!
[23 Jan 2014 18:42] Sveta Smirnova
JKjsdk Ldsfji8,

thank you for the feedback.

This bug is about MySQL Installer on Windows, but in your case I see:

2014-01-23 07:56:18 7952 [Note] C:/Program Files/MySQL/MySQL Server
5.6/bin\mysqld: Shutdown complete
...
2014-01-23 07:56:29 13684 [ERROR] InnoDB: Could not find a valid
tablespace file for 'pmtest/slave_master_info'. See
...

Is this clean installation? Looks like not since no database pmtest should exist in pre-installed datadir. If you upgraded you need to run mysql_upgrade.
[23 Jan 2014 19:28] JKjsdk Ldsfji8
Please disregard or delete my entry. The problem was already resolved. Thank you and sorry for the hassle.