A connector includes a shell configured to protect the connector and to be plugged into a connecting port slot, a plurality of terminals electrically connected to the connecting port slot, a connecting portion connected to an electronic device, a circuit board, and a cover. The circuit board includes a first contact portion electrically connected to the plurality of terminals, and a second contact portion, electrically connected to the connecting portion. The cover is fixed to the shell. The shell is arranged between the circuit board and the shell to fix the circuit board in the shell.