WARNING: This page is about a different car, the 2020 Mazda CX-30. However, it is still accessible from the selected car via links, so may be relevant.
With the ignition switched off, connect the malfunction diagnosis system to the DLC-2 connector shown in the illustration.