check mysql port in ubuntu with lsof code example Example: netstat -tln mysql lsof -n -P -i TCP -s TCP:LISTEN