Have you tried another cable? I assume the s5 uses the same microUSB connector most small devices do?
Have you tried wiggling the connector in the phone around a little? my Nexus 5 seems to be picky sometimes, and won't connect properly without me finding a position the cable will work in.
Tried another usb port, or tried anything else in that USB port?
and last, have you got your phone wet recently?