A plug connector for mating with a socket connector includes: a printed circuit board, an insulative housing partially covering the printed circuit board; a locking mechanism housed in the insulative housing, and an elastic piece matched with the locking mechanism, wherein the locking mechanism includes a pressing portion protruding from the insulative housing and a locking portion integrally formed with the pressing portion, one end of the locking portion exposing outside the insulative housing to be locked with the socket connector.