How to connect DB2 with eclipse on mac?
You may need to follow the Network Access steps from the DB2 on Mac OS X install guide:


  Network access
  
  The instructions below assume that you installed DB2 with your current
  user account. If you manually created a different account such as
  "db2inst1", replace $(whoami) with db2inst1
  
  If you need to access this DB2 instance remotely, you should configure
  the service:


db2 update dbm cfg using svcename db2c_$(whoami)

sudo su -
echo "db2c_$(whoami) 50000/tcp" &gt;&gt; /etc/services 
exit

db2set -all db2set DB2COMM=TCPIP 
db2stop force 
db2start


Alternately, instead of keeping the local DB2 Express-C install, you can run DB2 in a Docker container.