This of course has nothing to do with perl, so if you want better help you should probably ask someplace specific. However, possibly your mysql had an "unclean shutdown", and left some kind of marker file in a temporary directory that makes it think it's still running when it isn't.