You can easily locate your MySQL databases details by opening your cPanel account and selecting MySQL® Databases section:
Once there just scroll down to your desired database and the details will be shown right under Database and Privileged Users sections:
For database host you will need to use localhost.
That’s it! Now you know how to locate your MySQL databases details on cPanel 😊