Your live database details are usually stored in your application's config file, and you can confirm them in cPanel.
- WordPress: open
wp-config.phpin File Manager and readDB_NAME,DB_USER,DB_HOST. - Laravel and others: check the
.envfile forDB_DATABASE,DB_USERNAME,DB_HOST.
To verify names, open MySQL Databases in cPanel where all databases and users are listed (each prefixed with your account, e.g. cpuser_dbname). The host is almost always localhost. Passwords are not shown anywhere; if you forget one, reset it under the same page. Still stuck? Open a ticket.