This article explains how to delete all Wordpress comments awaiting moderation. This is useful for a Wordpress blog that has been inundated with spam and which is not using the Akismet
1. Once logged into the server and as the root user of MySQL, select the database as referenced in the wp-config.php file for the blog. Navigate into that database via the MySQL command prompt by running:
use database <database_name>; (where <database_name> is the name of the database)
2. Run the following command to delete all of the unapproved comments:
DELETE FROM wp_comments WHERE comment_approved=’0';
Once run, all of the Wordpress comments awaiting moderation are immediately deleted. This action is not reversible unless the database is restored from a good backup.