Why would you even think that an 8-pin connector would work in a 5-pin socket (or vice-versa)? Just because they may be the same physical size does not mean they are the same thing.
This is an interesting question. May I ask what is the reason for asking this question? What project are you trying to do? The 8 pin mini USB stuff was a common connector type for Sony, Canon and Casio cameras while the 5 pin type is used for instance by the Go Pro. Considering both type of connectors end up in a regular type A USB 2 connector it begs the question if it is possible to convert between the two by using something like this: https://www.amazon.com/SANOXY-Femal...ure_eight_browse-bin:15562490011&s=pc&sr=1-16 If you hook up the type A ends of each cable into this it would be interesting to know if it would be possible to transfer data from the 5 pin one to the 8 pin one or vice versa. I simply do not know if that will work.