For more than a year we used the Counterizer plugin for WordPress and thus keep statistics of the blog and its readers, this plugin we deactivated a few days ago since (among other things) it saved more than 600MBs of data in the database.
It happens that (before deactivating the plugin and cleaning the DB) I tried to dump the database, that is, export it to .SQL and thus download it and in the hosting terminal I got the following error:
mysqldump: Got error: 144: Table './dl_database/Counterize_Referers' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Therefore, the dump was not carried out and well... the mere idea of thinking that the DB of DesdeLinux I had a problem, it made my hair stand on end :)
Doing a little research on the web I was able to learn how to solve this problem, apparently it is NOT that the database has problems exactly, simply that a table is marked as 'with problems', fortunately this is very simple to fix.
First let's access the MySQL server:
mysql -u root -p
We press [Enter] and it will ask for the MySQL root password, we put it and press [Enter] again.
Once inside MySQL we will tell you which database to use, for example the problem according to the error above is in the table Counterize_Referers from the database dl_database, so that:
use database dl_database;
And now to repair the table base:
repair table Counterize_Referers;
Once the previous command has been executed, everything must have returned to normal, at least in my case it has been like that on more than one occasion 😉
Then it only remains to rerun the instruction to dump the database and voila, nothing more.
Anyway, I do this more than anything else as a memorandum for me, because the same thing has happened to me twice and I don't want to forget the instructions to save the day 😀
Greetings and I hope it is helpful to someone else.
Very good, you always have to have this type of item on hand for whatever reason.
Thank you
Yes… at the moment when the problem occurs, it is good to have the solution at hand, or at least to know where to find it without delay.
Good KZKGGaara. There are things that the PHPMyAdmin cannot do that the console can.
Thank you
Excellent, saved me more than once.
But I wonder, wouldn't it be mysql -u root -p instead of root -u root -p? I do not mean to offend.
Thank you!!
Excellent, saved me more than once.
But I wonder, wouldn't it be mysql -u root -p instead of root -u root -p? I ask without the intention of offending.
Thank you
LOL!!!! Completely true, my mistake LOL!
I was writing and thinking a step ahead, from there to write root instead of mysql ... Thanks for the warning 🙂
You're welcome! Sorry for the double post; I tried to send it repeatedly and it told me that it already existed (I reloaded the page and didn't see anything).
Greetings.
This comes out of my hair now that I'm getting into the DB issue.
Hello good,
One question, how often do you dump DB? is to know how long it takes to get up to 600MB of data
Greetings,
Ehm… I didn't understand you very well now 🙂
Before we did a cleanup in the DB of DesdeLinux This (that is, the .sql of the DB) weighed more than 700MB, because we kept all the statistics in the DB. That is, since almost the beginning of the blog.
Now we are using Google A. so we delete the statistics tables from the DB, and now the .sql does not reach 80MB
Does this answer your question?
Hello good,
Without troll, how often do you dump DB?
Several times a month 🙂
I always try to have the latest version of DesdeLinux
It seems ok to me, now it is not possible to do a general revision of the corrupted tables?
Thank you very much friend, your contribution helped me a lot.
regards
Thank you very much dear, thanks for the tips, they helped me !!
Greetings from Trujillo-Venezuela.
estimated
As I know if the process is running I wrote the command repair table import; and there I am
Thank you very much, you have saved my skin 😀
Hello friend, I don't know if you can help me, something similar happened with my website, mark this error:
The wp_posts table is not right. Report the following error: Table is marked as crashed and last repair failed. WordPress will try to repair this table ...
Failed to repair wp_posts table. Error: Table is marked as crashed and last repair failed
I don't know if you can help me fix it, I'm new to advanced WordPress. When trying to repair the wp-post table, it shows an error that it cannot be repaired. Thank you. My website is: https://diarionoticiasweb.com