HDMI connectors are not my favorite as they tend to easily come loose. The same holds true for the mini-displayport connection. The cable I use to connect my Mac mini to my large monitor kept coming lose whenever either was moved. The solution was to use this tool designed for HDMI connections but that also works well for the mini-displayport.
On the HDMI side, it screws into the screw connector often provided with an HDMI jack. On the Mac side, it can be attached using the included adhesive strip. It clamps onto the HDMI cable keeping things from wiggling free.
This is a neat solution to an annoying problem.