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: Transmitter battery replacement
1. Insert a small screwdriver into the slot and gently pry open the
transmitter.
2. Press the portion of the battery indicated by A and remove the battery.
3. Install a new battery (CR2025) into the front portion of the holder with
the positive pole (+) facing up. Press on the B portion of ...
Mazda 6 Owners Manual: Cell Phones
WARNING
Please comply with the legal regulations concerning the use of communication
equipment in vehicles in your country: Use of any electrical devices such
as cell phones, computers, portable radios, vehicle navigation or other devices
by the driver while the vehicle is moving is dangerous ...