Rather than killing the process (as in the accepted answer) it would be safer if you did it within MySQL:

    $ mysqladmin processlist -u root -p
    Enter password: 
    +-----+------+-----------+-------------------+---------+------+-------+------------------+
    | Id  | User | Host      | db                | Command | Time | State | Info             |
    +-----+------+-----------+-------------------+---------+------+-------+------------------+
    | 174 | root | localhost | example           | Sleep   | 297  |       |                  |
    | 407 | root | localhost |                   | Query   | 0    |       | show processlist |
    +-----+------+-----------+-------------------+---------+------+-------+------------------+

The query with id 174 is the one blocking deletion of the 'example' database, so before you kill any processes first let MySQL try to terminate the query:
    
    $ mysqladmin kill 174

Run the processlist command above again to confirm that it was killed.

If this doesn't work, then you could perhaps look at killing the errant process, but before that you might try restarting the MySQL server.