Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : MySQL won't start - please help?



Threaded Mode | Print  

 MySQL won't start - please help?, mySQL will not launch following PC restart (9 Replies, Read 27542 times)
j1mm1nycr1cket
Group: Member
Post Group: Newbie
Posts: 2
Status:
Hello,
I was using mySQL with no problems a couple of days ago but since restarting my machine, I can no longer launch my SQL.

This is the error log output:
2014-05-05 22:25:18 5612 [Note] InnoDB: Starting crash recovery.
2014-05-05 22:25:18 5612 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-05-05 22:25:18 5612 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace backup/slave_relay_log_info uses space ID: 3 at filepath: .\backup\slave_relay_log_info.ibd. Cannot open tablespace my_client/wp_terms which uses space ID: 3 at filepath: .\my_client\wp_terms.ibd
InnoDB: Error: could not open single-table tablespace file .\my_client\wp_terms.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 tried renaming wp_terms.ibd but that didn't work

I tried moving:
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

... to a different folder, but that didn't work.

I've searched for my.cnf but can't find any such file - where should it be?

What else can I try to get mySQL back up..?
Thanks in advance


IP: --   

MySQL won't start - please help?
j1mm1nycr1cket
Group: Member
Post Group: Newbie
Posts: 2
Status:
Hmmm... wouldn't you just  know it - I found a solution about 5 minutes after posting this.
OK, this is all within Windows 8.1 (for which I can only apologise) - so:
Look for a little, tiny upward-pointing arrow at the right-hand end of the taskbar, the tooltip will say 'Show hidden icons' it should contain an icon for AMPPS.
Right-click on that icon and you will see a list of options. From the top, choose Configuration > MySql and this will open Ampps > conf > my.ini
(of course you can just browse to this file and open if for yourself but I didn't realise how many options there are hidden in this 'hidden icons' panel on the taskbar and if  you didn't either, you just might find a lot of stuff that could prove useful later on)
In my.ini, search for this:
[mysqld]
...and directly below that, on a new line, put this:
innodb_force_recovery = 1

save and close the file. You should find you can relaunch mySQL now.

Follow the advice here:
http://dev.mysql.com/doc/refman/5.0/en/forcing-innodb-recovery.html

...and start with a value of 1, increasing the value incrementally if it doesn't work straight away.
If you can backup your .sql first, you should do so.
It's possible that some of your tables could have lost some data so if you get mySQL back up, don't be surprised if you get slightly weird or broken data in some tables but at least you should now have mySQL running again.
I think the moral of this story is to shut down AMPPS properly before you reboot your machine.
Maybe someone can set me straight on that..?
IP: --   

MySQL won't start - please help?
freaky123
Group: Member
Post Group: Newbie
Posts: 2
Status:
Hi there,

I am facing the same problem as above user - Apache starts just fine, but MySql won't start. Actually it starts for 2-3 seconds then stop. I have tried with adding innodb_force_recovery > 0 in my.cnf under mysqld, with no success.

I'm using Windows 7

Here is whats in the error log----



2014-06-28 18:31:11 4148 [Warning] You need to use --log-bin to make --binlog-format work.
2014-06-28 18:31:11 4148 [Note] Plugin 'FEDERATED' is disabled.
2014-06-28 18:31:11 4148 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-06-28 18:31:11 4148 [Note] InnoDB: The InnoDB memory heap is disabled
2014-06-28 18:31:11 4148 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-06-28 18:31:11 4148 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-06-28 18:31:11 4148 [Note] InnoDB: Not using CPU crc32 instructions
2014-06-28 18:31:11 4148 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-06-28 18:31:11 4148 [Note] InnoDB: Completed initialization of buffer pool
2014-06-28 18:31:11 4148 [Note] InnoDB: Highest supported file format is Barracuda.
2014-06-28 18:31:11 4148 [Note] InnoDB: The log sequence numbers 1838394 and 1838394 in ibdata files do not match the log sequence number 1838404 in the ib_logfiles!
2014-06-28 18:31:11 4148 [Note] InnoDB: Database was not shutdown normally!
2014-06-28 18:31:11 4148 [Note] InnoDB: Starting crash recovery.
2014-06-28 18:31:11 4148 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-06-28 18:31:11 4148 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace get_the_job/district uses space ID: 2 at filepath: .\get_the_job\district.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.

please help me. Thanks
IP: --   

MySQL won't start - please help?
tidus
Group: Member
Post Group: Super Member
Posts: 1123
Status:
Hi,

Please open a ticket we will look into it.

Also if you have a backup of your database, please try restoring it.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

MySQL won't start - please help?
freaky123
Group: Member
Post Group: Newbie
Posts: 2
Status:
Hi Tidus,

Thanks a lot...for your reply.

Actually I am very new bee for these support blog sites. I just posted my problem here, but now as per suggestion, I have opened a new ticket.

look forward for your help!!
IP: --   

MySQL won't start - please help?
ketan
Group: Member
Post Group: Working Member
Posts: 241
Status:
Hi,

Below is the solution for the above issue:

I hope you have a backup of the database.

Add "innodb_force_recovery = 1" instead of "innodb_force_recovery > 0".

Let us know if you are still facing the issues.

-----------------------
Follow AMPPS on,
Twitter
Facebook
Google+
IP: --   

MySQL won't start - please help?
walfave
Group: Member
Post Group: Newbie
Posts: 1
Status:
While using the windows 7, having the same problem discussed above, i tried innodb_force_recovery = 1 but still having same problem. Trying from yesterday but still having problem with no silution :-(
IP: --   

MySQL won't start - please help?
iksklibur
Group: Member
Post Group: Newbie
Posts: 1
Status:
Hi,

It's my first post and excuse me for my bad english.

The solution that I found is:

1) Create a new folder (for ex. in the desktop and name it as "ibd")
2) Go to the filepath where you can find .ibd files (normally in the directory "mysql\data\[name of the database]\*.ibd"
3) Move all the files with an extension .ibd to the folder created on the desktop.
4) Start now "MySQL". And normally it can start MySQL with no problem.
5) Stop MySQL
6) Restore all the files .ibd to the original folder
7) Start it again

It works for me  :angel:
IP: --   

MySQL won't start - please help?
TomDeSmet
Group: Member
Post Group: Newbie
Posts: 1
Status:
I have this quite a lot. And allthough the solution described here works, it corrupts my database and renders it useless. And it's not just by restarting my PC, it happens suddenly I believe.

But every time my database is corrupted and doesn't work as it should work. So I can't use AMPPS like this!
IP: --   

MySQL won't start - please help?
rapidsport
Group: Member
Post Group: Newbie
Posts: 1
Status:
Thank you iksklibur!
===

Hi,



It's my first post and excuse me for my bad english.



The solution that I found is:



1) Create a new folder (for ex. in the desktop and name it as "ibd")

2) Go to the filepath where you can find .ibd files (normally in the directory "mysql\data\[name of the database]\*.ibd"

3) Move all the files with an extension .ibd to the folder created on the desktop.

4) Start now "MySQL". And normally it can start MySQL with no problem.

5) Stop MySQL

6) Restore all the files .ibd to the original folder

7) Start it again



It works for me  :angel:
===

That was a bright idea!
I works for me too ))
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is September 19, 2018, 11:04 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.313