WP-CLI unable to recongnise PHP server / environment variables on Ubuntu

You would need to define the global URL parameter in wp-cli.yml or in the command like --url=https://example.com

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)