If you need to connect to the MySQL Database from External Application, you need to enable wildcard from the cPanel of Shared Hosting.
Visit cPanel > Remote MySQL.
After that put % like the following image and save.
After that you can connect by the external MySQL Client.
HostName: yourdomain.com
MySQL Username and password and database can be created by cPanel > MySQL Databases.