What am I doing wrong in mysql database?
If you are having a trigger on a table, You can not operate the same table which is used in the trigger.

As you mentioned you want to delete records from the table after inserting the records. Instead, why can't you skip inserting records to the table.

Can you mention your exact requirement in brief.