If you connect it to your computer does the phone charge?
Did you use another USB cable?
Did you use another USB port?
If you move around the USB cable does that have influence.
In device manager from your computer do you see the phone (error message)?
Did you ever connect your phone to the computer before and did it work then.
In Settings from your phone do you have a USB hub, if so what's the setting?