A connector to be attached to an opening of a liquid storing container, the connector comprising: a plug to be attached to an inner peripheral surface of the opening, the opening extending along an axial line; an improper connection preventing member to be attached to an outer peripheral surface of the opening extending along the axial line, the improper connection preventing member including a first engagement portion disposed at an outside of the outer peripheral surface with respect to the axial line; and a socket to be detachably attached to the plug, the socket including a second engagement portion to be engaged with the first engagement portion, wherein the plug and the socket are coupled together in a state where the first engagement portion and the second engagement portion are engaged with each other; one of the first engagement portion and the second engagement portion is a convex portion formed into a convex shape projecting in a direction along the axial line; the other one of the first engagement portion and the second engagement portion is a concave portion formed into a concave shape in the direction along the axial line and capable of accommodating the convex portion; the plug and the socket are coupled together in a state where the concave portion accommodates the convex portion; the convex portion includes a columnar first convex member and a columnar second convex member (150b, 150c), the concave portion includes a first concave hole for accommodating the first convex member and a second concave hole (330b, 330c) for accommodating the second convex member (150b, 150c), and characterized in that: a leading end of the first convex member projects to a larger extent than a leading end of the second convex member (150b, 150c). a plug to be attached to an inner peripheral surface of the opening, the opening extending along an axial line; an improper connection preventing member to be attached to an outer peripheral surface of the opening extending along the axial line, the improper connection preventing member including a first engagement portion disposed at an outside of the outer peripheral surface with respect to the axial line; and a socket to be detachably attached to the plug, the socket including a second engagement portion to be engaged with the first engagement portion, wherein the plug and the socket are coupled together in a state where the first engagement portion and the second engagement portion are engaged with each other; one of the first engagement portion and the second engagement portion is a convex portion formed into a convex shape projecting in a direction along the axial line; the other one of the first engagement portion and the second engagement portion is a concave portion formed into a concave shape in the direction along the axial line and capable of accommodating the convex portion; the plug and the socket are coupled together in a state where the concave portion accommodates the convex portion; the convex portion includes a columnar first convex member and a columnar second convex member (150b, 150c), the concave portion includes a first concave hole for accommodating the first convex member and a second concave hole (330b, 330c) for accommodating the second convex member (150b, 150c), and characterized in that: a leading end of the first convex member projects to a larger extent than a leading end of the second convex member (150b, 150c).