error: 'Error dropping database (can't rmdir './', errno: 39)'
SolutionThanks to the folks at stackoverflow.com for a quick and easy solution.
Errno 39 is "directory not empty". So the directory contains some files MySQL knows nothing about. Move them outside (or delete them if not needed) and retry.