Keyword

[SOLVED] What is the safest way to delete 700,000 K2 Commen

  • Mark Hass
  • Mark Hass's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122243 by Mark Hass
I am recovering from a robot attack that filled with spam an insecure K2 comments field.
Can I simply delete all records from the K2 Comments table, or will that cause new problems with other tables?
Attachments:

Please Log in or Create an account to join the conversation.

  • olsen
  • olsen's Avatar
  • Offline
  • Elite Member
  • Joomla and K2 Freelancer
More
10 years 9 months ago - 10 years 9 months ago #122244 by olsen
WOW!!!! nearly 1M comments! nice, hehehe
Yeah you can safely delete all records on the k2_comments table. Use this query in your phpmyadmin
TRUNCATE TABLE `#_k2_comments`

Change #_ for your DB prefix

Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details

Please Log in or Create an account to join the conversation.

  • Mark Hass
  • Mark Hass's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122245 by Mark Hass
Glad you think it funny. My host disconnected my db and seemed reluctant to reconnect me.
My previous K2 module developer (looking for a new one now) delivered his demo site with an insecure comments field three links deep, and quit the job after I paid him for work completed without so much as a fare thee well. :angry:

Thanks.
Mark

Please Log in or Create an account to join the conversation.

  • olsen
  • olsen's Avatar
  • Offline
  • Elite Member
  • Joomla and K2 Freelancer
More
10 years 9 months ago #122246 by olsen
Hi Mark,
Please dont hesitate to contact me if you have some work to do or need other help.

Thank you
regards
olsen

Didn't solve your issues?? Why dont you consider hire me? Email me or contact me www.xevedigital.com for details

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #122247 by Cache Advertising
Replied by Cache Advertising on topic Re: What is the safest way to delete 700,000 K2 Commen
I had the same issue, but with 2 million+ comments. As per instruction from a support rep from my hosting company I executed the truncate command as you suggested. It took about 30 minutes to execute, but it worked. My problem now is that the comments are still on my site. I verified they are deleted from the database, but they are still showing up on my site??? In the backend it allows me to delete them 100 at a time and it seems to work, but that would take years. Please enlighten me on what I'm missing. Thanks in advance.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #122248 by Yiota
Hello shawn,

So you don't see them in your database and you see them both in your backend and frontend or just in frontend?
If you see them only in the frontend maybe what you are seeing is cache. Try to clean up both your site's and your browser and check again if that is indeed the case.

Please Log in or Create an account to join the conversation.

  • Mark Hass
  • Mark Hass's Avatar Topic Author
  • Offline
  • New Member
More
10 years 8 months ago #122249 by Mark Hass
When I had the problem I simply emptied the K2 comments table. I then cleaned the browser and joomla caches, and the fix worked immediately.

Mark.

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #122250 by Cache Advertising
Replied by Cache Advertising on topic Re: What is the safest way to delete 700,000 K2 Commen
They were still present in both the front and backend. Cache in global parameters "Off-Caching disabled" so no Cache to delete. Tried multiple browsers on multiple computers and even cleaned up with CCleaner.
But...
The problem has been resolved.
Unfortunately I now only have more questions than answers.
Before I initially deleted the comments table I backed up the database just to be safe. Today for no real reason other than lack of any other ideas I deleted the comments table in the backup database and Lo and behold they were suddenly gone from my site. Oddly, deleting all 2+ million of them only took .07 seconds instead of 30 minutes like before. Almost like they weren't really there. My site positively isn't connected to the backup database in any way other than just being on the same server.
Rather than lose sleep over trying to figure out why; I'm just blaming this one on Godaddy.

Thanks to you both for your responses.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #122251 by Yiota
You are welcome Shawn,

I'm glad you finally managed to solve you issue.

Please Log in or Create an account to join the conversation.

  • Mark Hass
  • Mark Hass's Avatar Topic Author
  • Offline
  • New Member
More
10 years 8 months ago #122252 by Mark Hass
I had a similar problem once. A developer I was using told me that he had never had so many problems working with Joomla. After I changed hosts and moved my entire site, all sorts of problems seemed to fix themselves. I suspect that pages not being updated, and weird problems like I also had with old problems reoccurring, had to do with my host trying to fix my problem by installing the old database after they screwed up my site when they had server problems.

Keep regular backups, and practice recovery on a test site. Don't count on your host for current backups. Not all host services are created equal, especially when working with joomla.

I also found an Islamist blogger teaching how to hack Joomla, WordPress, and Drupal CMS websites. All the more reason to practice backups and recoveries. These bad guys and robot hacks are very aggressive. Take care.

Glad you are back up.
Mark.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum