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: Cylinder head gasket
CYLINDER HEAD GASKET REPLACEMENT
Warning
Fuel vapor is hazardous. It can very easily ignite, causing
serious injury and damage. Always keep sparks and flames away from fuel.
Fuel line spills and leakage are dangerous. Fuel can ignite and
cause serious injuries or death and damage. Fuel ...
Mazda 6 Owners Manual: No. 2 all on-board diagnostic functions inoperative
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 malfunctions. If there
is a problem, check to make sure connectors, terminals and wir ...