Getting to many MySQL file corrupt errors
Posted: Wed Apr 29, 2015 8:51 am
Hi, Before I market my website I am populating a few database files manually. So I am adding maybe 100 records a day to some of these files. I am getting a lot of MySQL (MyIsam) corruptions that I am fixing with the "myisamchk -r" command. I read that MySQL databases corrupt easily so at first I did not think much of it. But now I am realizing that I am getting them way more than would seem normal. In other words if I add 100 records I can be sure that I will need to do some fixes. So now I am thinking maybe I have done something wrong. I did some google searches for trouble shooting MySQL errors and that went nowhere. One of the errors suggested the file was not properly closed. So I tried a bunch of google searches thinking I needed a close command after every access of the tables (somewhere I read that I don't need to do this). Anyway, these google searches did not find a close statement. I even found a list of MySQL statements and a second list of MySQL commands and did not find a close statement when searching the lists. So for now (as a temp measure) I have created a batch file to fix all the files regardless of whether they need fixing or not. Years back I wrote a bash script which had a menu and I could select menu options but I can't remember how I did that so I just do them all for now. Learning how to create a menu like that again is on my to-do list somewhere - LOL - down a ways - LOL. Is this number of errors normal? Maybe I need to start inspecting the MySQL log? Does anyone have any suggestions?
Thanks,
John
P.S. from the link below I just read " If you get a lot of these errors, without mysqld having died unexpectedly just before, then something is wrong and needs to be investigated further."
https://dev.mysql.com/doc/refman/5.5/en ... ption.html
I also found this. Just starting to read it.
https://dev.mysql.com/doc/refman/5.5/en ... -case.html
Thanks,
John
P.S. from the link below I just read " If you get a lot of these errors, without mysqld having died unexpectedly just before, then something is wrong and needs to be investigated further."
https://dev.mysql.com/doc/refman/5.5/en ... ption.html
I also found this. Just starting to read it.
https://dev.mysql.com/doc/refman/5.5/en ... -case.html