Fix environment overwriting for mysql commands

The `proc_open` call replaces the environment variables for mysql commands. 

Merging the $env array with the global $_ENV will fix the issue.