Command not found error in CircleCI 2.0

This is because all of your commands will run in the first container that is listed (primary container). This is typically not the database container, which means that the mongo cli is likely not installed in the primary container. The same can happen for mysql and postgresql.

In these cases you can install the client using sudo apt install or the relevant package manager for the distro your image is running.