Hello to everyone.
So I have 2.2. AMPPS. I logged OFF the PC without turning off the MySQL in Apache Server. After starting AMPPS later the MySQL server won't start, so I did this:
Delete all the files from mysql like mysql-bin.*, mysql-bin.index, ib*, etc without deleting any folder.
Then I restart the AMPPS and it all the server started. But now one of the database is not working. Any table that I click I get this error: #1146 - Table "xxx" doesn't exist.
It is not the first time I did this fail about forgetting to turning of the MySQL and Apache server and after that I always get this error. And I always lose all the data ://
But what is this bug? I really hope there is solution, how to get back my lost tables..
Because if I lost them now I really lost a lot of time.. :/
So I put back all the deleted files before and this is the log error that I get:
2014-02-13 10:55:17 7972 [Note] Plugin 'FEDERATED' is disabled.
2014-02-13 10:55:17 7972 [Note] InnoDB: The InnoDB memory heap is disabled
2014-02-13 10:55:17 7972 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-02-13 10:55:17 7972 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-02-13 10:55:17 7972 [Note] InnoDB: Not using CPU crc32 instructions
2014-02-13 10:55:17 7972 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-02-13 10:55:17 7972 [Note] InnoDB: Completed initialization of buffer pool
2014-02-13 10:55:17 7972 [Note] InnoDB: Highest supported file format is Barracuda.
2014-02-13 10:55:17 7972 [Note] InnoDB: The log sequence numbers 48526310 and 48526310 in ibdata files do not match the log sequence number 49150156 in the ib_logfiles!
2014-02-13 10:55:17 7972 [Note] InnoDB: Database was not shutdown normally!
2014-02-13 10:55:17 7972 [Note] InnoDB: Starting crash recovery.
2014-02-13 10:55:17 7972 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-02-13 10:55:17 7972 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_index_stats uses space ID: 2 at filepath: .\mysql\innodb_index_stats.ibd. Cannot open tablespace prochild/downloads which uses space ID: 2 at filepath: .\datatable\downloads.ibd
InnoDB: Error: could not open single-table tablespace file .\prochild\downloads.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 found a way to fix this. just follow my steps and mysql will start again.
1. Go to Ampps\mysql\data
2. Create a "Backup" folder under data
3. Move those files to your Backup folder
Quote
innodb_index_stats.frm
innodb_index_stats.ibd
innodb_table_stats.frm
innodb_table_stats.ibd
slave_master_info.ibd
slave_relay_log_info.frm
slave_relay_log_info.ibd
slave_worker_info.frm
slave_worker_info.ibd
4. now open control panel and click on start under mysql