1. Remove the rear door glass.
2. Remove the inner handle.
3. Remove the rear door speaker.
4. Disconnect the power window motor connector, and power door lock actuator connector.
5. Remove the rear door harness from the rear door unit.
6. Remove the bolts.

7. Remove the rear door lock actuator hook from the rear door unit.
8. Pull the rear door unit slightly towards you, and while keeping the power window regulator or manual window regulator from catching on the door, remove the door unit from the door.
9. Pull out the inner handle cable and door lock knob cable from the hole.
10. For power window system-equipped vehicles, remove the power window motor and power window regulator from the door unit. For manual window system-equipped vehicles, remove the regulator handle and manual window regulator.

11. Install in the reverse order of removal.
Front door unit removal/installation
Front door latch and lock actuator removal/installationMazda 6 Service Manual: Scheduled Maintenance (U.S.A., Canada, and Puerto Rico)
Follow Schedule 1 if the vehicle is operated mainly where none of the following
conditions (severe driving conditions) apply.
Repeated short-distance driving
Driving in dusty conditions
Driving with extended use of brakes
Driving in areas where salt or other corrosive materials are used
...
Mazda 6 Service Manual: To Operate the System
The High Beam Control System (HBC) operates to switch the headlights automatically
between high and low beams after the ignition is switched ON and the headlight switch
is in the AUTO and high beam position.
The High Beam Control System (HBC) determines that it is dark based on the brightness
...