The first Apple and Mac mouses plug into a serial-like Mouse Interface card that was installed inside the computer. The port is a DE-9 socket. The mouse plug consists of a DE-9 pin shell with one pin removed, not a DE-9 socket like PC mouses. Some other computers, not PCs, did use the 9-pin plug.
Apple's Lisa mouse connector set the configuration standard for successive Apple serial mouses, albeit within simpler housings.
In 1986 Apple created the Apple Desktop Bus (ADB) for the mouse on the Apple IIgs. It uses a hot-swappable mini-DIN connector. Beginning with the the Macintosh II and Macintosh SE the ADB was used on all subsequent Macs. The ADB protocol was also used on Sun, HP and NeXT computers, who must license use of it from Apple, which owns the patent. More than one device can connect to the bus either via a pass-through plug or a second port on the bus card.
Apple Desktop Bus (ADB) mouse plug. ADB pinout diagram courtesy of user Mobius at Wikipedia.
Apple Desktop Bus (ADB) plug is configured as a 4 pin mini-DIN connector. At first glance it might look like a PS/2 but it is not. The mouse requires a bus connection to a card installed in the Apple computer.
Serial and specific mouse ports gave way to the standardized USB Connection for most peripherals on all manner of computers.