How to find the Magento 2 database credentials using the command line?

grep -E "host|dbname|username|password|table_prefix" app/etc/env.php

See also: