A board attaching structure includes a first board on which a first connector provided, a second board on which a second connector provided, a plate-like member extending parallel to the first board and covering at least part of an surface of the first board, a posture restricting portion formed by bending part of the plate-like member toward the first board and configured to restrict a posture of the second board with respect to the first board when the second connector is mounted on the first connector, and a position restricting portion formed by bending part of the plate-like member and configured to restrict a position at which the second board is arranged on the first board while the second connector is mounted on the first connector.