Have a look here: http://forum.xda-developers.com/show....php?t=1520528
Try cleaning the USB port on the phone with a tiny brush or something, make sure there is no dirt, and also make sure the pin is aligned correctly in the USB port, mine went like this and I fixed it by tweaking with the USB port. But also have a look at the thread.

This has been happening quite a lot to many of the S2s all around the world from the looks of it. I think Samsung is using some cheap faulty material in their USB ports which is causing them to corrode/fail easily. I've changed mine completely once and had to pay for it since they conveniently categorized it under 'water contact with the phone' which they couldn't cover under warranty and I paid for a complete replacement. 5 months later and its happened again. Absolutely unacceptable. Please write in to Samsung and complain about this.

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer?