how to find out mysql server port number on mac code example Example: how to check the port of mysql installation in mac lsof -n -P -i TCP -s TCP:LISTEN