Web lists-archives.com

Re: mysql\innodb_table_stats.ibd. Cannot open tablespace




Hi Neil,

When you say you delete the current database, do you mean the database
files only? Are you doing a complete restore?

On Fri, Jan 22, 2016 at 1:23 PM, Neil Tompkins <neil.tompkins@xxxxxxxxxxxxxx
> wrote:

> Hi,
>
> Hoping someone can help me identify why I keep having to restore my
> database.  You can see below, that my machine shut down normally, yet when
> I restarted the machine back up, I'm getting the error
> 'mysql\innodb_table_stats.ibd. Cannot open tablespace' and am having to
> delete the current database and restore my backup.
>
> Here is my Error log file.
>
> 2016-01-22 18:06:28 2540 [Note] MySQL: Normal shutdown
>
> 2016-01-22 18:06:28 2540 [Note] Giving 0 client threads a chance to die
> gracefully
> 2016-01-22 18:06:28 2540 [Note] Event Scheduler: Purging the queue. 0
> events
> 2016-01-22 18:06:28 2540 [Note] Shutting down slave threads
> 2016-01-22 18:06:28 2540 [Note] Forcefully disconnecting 0 remaining
> clients
> 2016-01-22 18:06:28 2540 [Note] Binlog end
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'partition'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_SYS_TABLESPACES'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_SYS_FOREIGN_COLS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_SYS_TABLESTATS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_FT_INDEX_TABLE'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_FT_INDEX_CACHE'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_FT_BEING_DELETED'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_FT_DELETED'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_FT_DEFAULT_STOPWORD'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_METRICS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_BUFFER_POOL_STATS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_BUFFER_PAGE_LRU'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin
> 'INNODB_CMP_PER_INDEX_RESET'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_CMPMEM'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_CMP_RESET'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_CMP'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_LOCKS'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'INNODB_TRX'
> 2016-01-22 18:06:31 2540 [Note] Shutting down plugin 'InnoDB'
> 2016-01-22 18:06:31 2540 [Note] InnoDB: FTS optimize thread exiting.
> 2016-01-22 18:06:31 2540 [Note] InnoDB: Starting shutdown...
> 2016-01-22 19:43:48 2556 [Note] Plugin 'FEDERATED' is disabled.
> 2016-01-22 19:43:48 2556 [Warning] option 'innodb-autoextend-increment':
> unsigned value 67108864 adjusted to 1000
> 2016-01-22 19:43:48 a0c 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.
> 2016-01-22 19:43:48 2556 [Note] InnoDB: The InnoDB memory heap is disabled
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Mutexes and rw_locks use Windows
> interlocked functions
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Compressed tables use zlib 1.2.3
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Not using CPU crc32 instructions
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Initializing buffer pool, size =
> 1.0G
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Completed initialization of buffer
> pool
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Highest supported file format is
> Barracuda.
> 2016-01-22 19:43:48 2556 [Note] InnoDB: The log sequence numbers 1600607
> and 1600607 in ibdata files do not match the log sequence number 154136116
> in the ib_logfiles!
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Database was not shutdown normally!
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Starting crash recovery.
> 2016-01-22 19:43:48 2556 [Note] InnoDB: Reading tablespace information from
> the .ibd files...
> 2016-01-22 19:43:48 2556 [ERROR] InnoDB: Attempted to open a previously
> opened tablespace. Previous tablespace mysql/innodb_table_stats uses space
> ID: 1 at filepath: .\mysql\innodb_table_stats.ibd. Cannot open tablespace
> sportstrader/event which uses space ID: 1 at filepath:
> .\sportstrader\event.ibd
> InnoDB: Error: could not open single-table tablespace file
> .\sportstrader\event.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.
>