All doors lock automatically when the lock side is pressed. They unlock when the unlock side is pressed.
Driver's door

Front passenger's door

To lock all the doors from an open front door, press the lock side of the door lock switch and then close the door.
NOTE
When locking the doors this way, be careful not to leave the key inside the vehicle.
Locking, Unlocking with Transmitter
Auto Lock/Unlock FunctionMazda 6 Owners Manual: Engine Exhaust (Carbon monoxide)
WARNING
Do not drive your vehicle if you smell exhaust gas inside the vehicle:
Engine exhaust gas is dangerous. This gas contains carbon monoxide (CO), which is
colorless, odorless, and poisonous. When inhaled, it can cause loss of consciousness
and death. If you smell exhaust gas inside the ...
Mazda 6 Owners Manual: No.8 brake system warning light stays on more than 4 seconds with ignition
switch on
Diagnostic procedure
When performing an asterisked (*) troubleshooting inspection, shake the
wiring harness and connectors while doing the inspection to discover whether
poor contact points are the cause of any intermittent malfunction. If there
is a problem, check to make sure co ...