Because the shell spawned by BESClient is not a login shell, by default, it does not source your account’s environment variables (like $PATH). Likely ‘mysql’ is not in the shell’s PATH.
See Linux script fails. for launching /bin/sh --login and saving the output and error messages to a file.