How can you find the name of a WordPress database?

Open wp-config.php in the root of the WordPress installation and find the DB_NAME definition. The quoted value is the database WordPress tries to use. On shared hosting it often includes the hosting account prefix, so copy the entire value exactly as written.
The same section contains the database username, host, and password. Do not publish or send a screenshot of these lines. If you need help, share the database name only when required and redact the credentials. Keep a backup of the configuration file before editing it.
You can compare the value with the database list in cPanel or phpMyAdmin. If the named database does not exist, the account lacks permission, or the host value is wrong, WordPress may display an error establishing a database connection. Check the file from the active document root because an old backup folder can contain a different configuration.
On platforms that use environment variables or managed configuration, wp-config.php may contain a reference to a variable. Find the final value in the platform dashboard or deployment settings. Use read-only inspection first; changing the database name connects the site to different data and can make it appear empty.