Used getenv to grab the path for mysql.

This fixes #950 and does not change `bin/wp` tried in #1029

`$ wp db cli`

As mentioned in #950 we should not rely on $_ENV altogether but that's not in scope for bug #950