Table "mysql"."innodb_table_stats" not found - mysql

Guys I installed xampp with mysql yday. managed to created a simple db with a single table.
This morning, for some reason Apache is running in my control panel but mysql gives a 'Error:mySQL Shoudown unexpectedly.' Reading the log, apparently some "innodb_table_stats" cannot be found/reached. If it helps, I was playing with the my.cnf as discussed here (MySQL Server has gone away when importing large sql file) yday.
Follows the full log.
2013-12-05 09:18:16 2660 [Note] Plugin 'FEDERATED' is disabled.
2013-12-05 09:18:16 124c 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-12-05 09:18:16 2660 [Note] InnoDB: The InnoDB memory heap is disabled
2013-12-05 09:18:16 2660 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-12-05 09:18:16 2660 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-12-05 09:18:16 2660 [Note] InnoDB: Not using CPU crc32 instructions
2013-12-05 09:18:16 2660 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2013-12-05 09:18:16 2660 [Note] InnoDB: Completed initialization of buffer pool
2013-12-05 09:18:16 2660 [Note] InnoDB: Highest supported file format is Barracuda.
2013-12-05 09:18:16 2660 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 5602287 in the ib_logfiles!
2013-12-05 09:18:16 2660 [Note] InnoDB: Database was not shutdown normally!
2013-12-05 09:18:16 2660 [Note] InnoDB: Starting crash recovery.
2013-12-05 09:18:16 2660 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-12-05 09:18:17 2660 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace intrasdata#00201#002e0#002e0/intrasextract uses space ID: 2 at filepath: .\intrasdata#00201#002e0#002e0\intrasextract.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.

I would reinstall mysql server again, or the full xampp if its easier for you.

Related

WAMP Not turning green

I have installed WAMP on my 32-bit Windows 7. It was working fine for a few days but after which it started giving problems.
I suspect the problem is with MySQL because I have tested my port 80 and it is working fine. I am unable to start wampmysqld service. It throws up the error "1067- process terminated unexpectedly".
In WAMP wizard MySQL service is in green colour, so thats the indication that MySQL service has not started.
The MySQL log shows up like
2016-08-22 13:27:56 6020 [Note] Plugin 'FEDERATED' is disabled.
2016-08-22 13:27:56 6020 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-08-22 13:27:56 6020 [Note] InnoDB: The InnoDB memory heap is disabled
2016-08-22 13:27:56 6020 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-08-22 13:27:56 6020 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-08-22 13:27:56 6020 [Note] InnoDB: Completed initialization of buffer pool
2016-08-22 13:27:56 6020 [Note] InnoDB: Highest supported file format is Barracuda.
2016-08-22 13:27:56 6020 [Note] InnoDB: The log sequence numbers 80291311 and 80291311 in ibdata files do not match the log sequence number 86947014 in the ib_logfiles!
2016-08-22 13:27:56 6020 [Note] InnoDB: Database was not shutdown normally!
2016-08-22 13:27:56 6020 [Note] InnoDB: Starting crash recovery.
2016-08-22 13:27:56 6020 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-08-22 13:27:56 6020 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace dbzenroc/roc_changeaddress uses space ID: 435 at filepath: .\dbzenroc\roc_changeaddress.ibd. Cannot open tablespace joomla/dtfp2_updates which uses space ID: 435 at filepath: .\joomla\dtfp2_updates.ibd
InnoDB: Error: could not open single-table tablespace file .\joomla\dtfp2_updates.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.
Immediate help would be highly appreciated. Thanks.
Three possible fixes are given in the log itself!
Check permissions
Delete the table which is creating the issue(if it doesn't have any required data)
Try recovery after force crash
Restart services after whichever step you try.
If these don't work, then copy/export required data from MySQL and uninstall & reinstall.

Error: could not open single-table tablespace file .\scrapers\records.ibd

I have AMPPS installed on my Windows 10.
I was unable to start MySQL. I have searched through this error and tried different things to recover my data.
This was the error log:
2016-02-03 10:19:54 6448 [Warning] You need to use --log-bin to make --binlog-format work.
2016-02-03 10:19:54 6448 [Note] Plugin 'FEDERATED' is disabled.
2016-02-03 10:19:54 6448 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-02-03 10:19:54 6448 [Note] InnoDB: The InnoDB memory heap is disabled
2016-02-03 10:19:54 6448 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-02-03 10:19:54 6448 [Note] InnoDB: Memory barrier is not used
2016-02-03 10:19:54 6448 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-02-03 10:19:54 6448 [Note] InnoDB: Not using CPU crc32 instructions
2016-02-03 10:19:54 6448 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-02-03 10:19:54 6448 [Note] InnoDB: Completed initialization of buffer pool
2016-02-03 10:19:54 6448 [Note] InnoDB: Highest supported file format is Barracuda.
2016-02-03 10:19:54 6448 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 132125643 in the ib_logfiles!
2016-02-03 10:19:54 6448 [Note] InnoDB: Database was not shutdown normally!
2016-02-03 10:19:54 6448 [Note] InnoDB: Starting crash recovery.
2016-02-03 10:19:54 6448 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-02-03 10:19:54 6448 [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 scrapers/openpasts_records which uses space ID: 1 at filepath: .\scrapers\openpasts_records.ibd
InnoDB: Error: could not open single-table tablespace file .\scrapers\openpasts_records.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.
I have tried setting innodb_force_recovery = 1 in my.cnf
Also I have tried removing ibdata1 file as well.
After removing ibdata1, MySQL started perfectly.
and my table shows in PHPmyADMIN, but when I click on it it says table does not exists even it exists
In my D:\Ampps\mysql\data\scrapers directory, I can see records.ibd file and records.frm file as well. That means table physically exists but is corrupted.
Does someone know how do I recover that table?
set value of
innodb_force_recovery = 1
or 2 or 3 or 4
in my.ini file under [mysql]
try this hopefully it will solve your problem.

error while starting mysql

I am getting Error while starting mysql using xampp . I dont know how to fix this
Error: MySQL shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
log file says
2014-10-08 11:40:53 5788 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-10-08 11:40:53 5788 [Note] InnoDB: The InnoDB memory heap is disabled
2014-10-08 11:40:53 5788 [Note] InnoDB: Mutexes and rw_locks interlocked functions
2014-10-08 11:40:53 5788 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-10-08 11:40:53 5788 [Note] InnoDB: Not using CPU crc32 instructions
2014-10-08 11:40:53 5788 [Note] InnoDB: Initializing buffer pool, size = 1.0G
2014-10-08 11:40:53 5788 [Note] InnoDB: Completed initialization of buffer pool
2014-10-08 11:40:53 5788 [Note] InnoDB: Highest supported file format is Barracuda.
2014-10-08 11:40:53 5788 [Note] InnoDB: The log sequence numbers 115503975998 and 115503975998 in ibdata files do not match the log sequence number 189324800563 in the ib_logfiles!
2014-10-08 11:40:53 5788 [Note] InnoDB: Database was not shutdown normally!
2014-10-08 11:40:53 5788 [Note] InnoDB: Starting crash recovery.
2014-10-08 11:40:53 5788 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-10-08 11:40:53 11e8 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: Error: could not open single-table tablespace file .\trillium_data\insulist_id_exist.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.
what steps should i take?

restore mysql database from an old mysql folder

i want to restore one database from my old mysql folder,
i copied mysql/data folder from old installation into my current mysql folder, yet its not starting up any more.
when i check the error_log file i see
2014-05-04 11:01:24 5344 [Note] Plugin 'FEDERATED' is disabled.
2014-05-04 11:01:24 1d5c 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-05-04 11:01:24 5344 [Note] InnoDB: The InnoDB memory heap is disabled
2014-05-04 11:01:24 5344 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-05-04 11:01:24 5344 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-05-04 11:01:24 5344 [Note] InnoDB: Not using CPU crc32 instructions
2014-05-04 11:01:24 5344 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2014-05-04 11:01:24 5344 [Note] InnoDB: Completed initialization of buffer pool
2014-05-04 11:01:24 5344 [Note] InnoDB: Highest supported file format is Barracuda.
2014-05-04 11:01:24 5344 [Note] InnoDB: The log sequence numbers 1689664 and 1689664 in ibdata files do not match the log sequence number 3461183 in the ib_logfiles!
2014-05-04 11:01:24 5344 [Note] InnoDB: Database was not shutdown normally!
2014-05-04 11:01:24 5344 [Note] InnoDB: Starting crash recovery.
2014-05-04 11:01:24 5344 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-05-04 11:01:24 5344 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace database/settings uses space ID: 146 at filepath: .\database\settings.ibd. Cannot open tablespace elegant/encounter_dr which uses space ID: 146 at filepath: .\elegant\encounter_dr.ibd
InnoDB: Error: could not open single-table tablespace file .\elegant\encounter_dr.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.
i'm not sure what exactly is the problem, i copied the folder as is.. may be its a different mysql version (2years old backup) but i'm sure everthing is there !.
is there anyother way to restore database from data folder ?
I saw in log file that elegant db is causing the problem, since i dont even need it i deleted the hole folder. now mysql starts but it show only tables, and when ever i try to use this table it say Table doesnot exists
i check log now there is a new errors
2014-05-04 11:03:41 7828 [Warning] InnoDB: Cannot open table z125/inventory_items 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.
2014-05-04 11:03:41 7828 [Warning] InnoDB: Cannot open table z125/inventory_transactions 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 Wont start - using Xibo on Xampp

Restarted my server
getting no where with this error
tried changing port numbers
trid changing permissions on the specific it asked.
any help with this will be greatly appreciated.
I'm using XIBO on xamppp and the MYSQL database wont start so now i cant configure the XIBO, but when XAMPP is running without MYSQL i can view the content.
Below are the logs of the problem i am having.
Again thanking you in advance regarding this.
2013-11-27 09:29:11 848 [Note] Plugin 'FEDERATED' is disabled.
2013-11-27 09:29:11 ea0 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-11-27 09:29:11 848 [Note] InnoDB: The InnoDB memory heap is disabled
2013-11-27 09:29:11 848 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-11-27 09:29:11 848 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-11-27 09:29:11 848 [Note] InnoDB: Not using CPU crc32 instructions
2013-11-27 09:29:11 848 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2013-11-27 09:29:11 848 [Note] InnoDB: Completed initialization of buffer pool
2013-11-27 09:29:11 848 [Note] InnoDB: Highest supported file format is Barracuda.
2013-11-27 09:29:11 848 [Note] InnoDB: The log sequence numbers 3140458 and 3140458 in ibdata files do not match the log sequence number 3747628 in the ib_logfiles!
2013-11-27 09:29:11 848 [Note] InnoDB: Database was not shutdown normally!
2013-11-27 09:29:11 848 [Note] InnoDB: Starting crash recovery.
2013-11-27 09:29:11 848 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-11-27 09:29:11 848 [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 xibo/bandwidth which uses space ID: 1 at filepath: .\xibo\bandwidth.ibd
InnoDB: Error: could not open single-table tablespace file .\xibo\bandwidth.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.
If your computer running "skype", just quit it then start MySQL. Because they both may use same port number