How to Fix Error establishing a database connection for any WP-CLI Command For MAMP

Sometimes while running WP-CLI commands, you will get following error

Error establishing a database connection

So this can be fixed by very simple method. Please watch the video for how to fix that.