Good day, just today morning i was using drupal to add some content, it crashed and mysql shutdown unexpectedly at xampp!!
last thing i was doing was inserting a data into a field with "auto complete entity reference"..but after inserting, it gave me an error in red: "no data exist in entity reference", next thing i did to fix my insertion, it got this error for mysql crashing!
i tried to restarted it many time, but each time it started, it doesn't respond to anything, then shuts down again.
sometimes i was hardly able to logon to phpmyadmin, check the database, (all looed ok to me) but before going deep, it crashed again! (its been just less than 1 min time, and slow response before the crash!)
i tried writing any sql statment(i thought it has something to do with drupal cache, so i wanted to delete their data), but it hangs and eventually mysql shuts down again.
here's a screen shot of drupals' initial error:
but after trying to refresh and restart mysql at xampp, i get this error:
i looked around google and stack exchange, and found that i need to check the error log file at mysql..after long hours of determining the problem i THINK i found my problem is with a corrupt table: (i couldnt post all lines of error reporting here cuz they're too long)
so from between the lines i found this:
InnoDB: table "bitnami_drupal7"."field_revision_field_citizenship"iis corrupted. Please drop the table and recreate.
[Warning] InnoDB: Cannot open table bitnami_drupal7/field_revision_field_citizenship 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.
i was surprised that a whole service is shutdown because a simple table, how come? and why would a table be corrupted by itself? i mean i was just minding my own business with drupal contents and adding setting and thing(not even coding, nothing), how could such a thing happen?
i found some solutions, (the one with increasing the packet size didnt work btw, cuz it happened before and it solved, but now it seems different), here are some solutions which say:
innodb_force_recovery = 1
Delete: "ibdata1" file at "C:\xampp\mysql\data"
so, the reason im asking here is that, are those methods safe? will they not affect my drupal tables?
it would be disastrous for me if anything goes wrong, because 1st solution says "FORCE" which sounds scary and could end up corrupting things based on what i read. (im not entirely sure though)
also, 2nd solution which is deleting that file (im not sure wht that file is or does), does that file contain any database stuff that affect my database files? or is it only for configuring purpose? i mean maybe some people are not having serious stuff in database so they tried it and worked for them.
but for me its very critical if anything bad happens to my data from those solution.
I'd like to know if those solution wont affect my data.
I'm pretty new to this database stuff, so im not sure..thats why im trying to take a cautious step to ask here.
Please guide me from your experiences.