In order to connect to a MySQL database, you typically use the following command:
mysql -h host_address database_name -u db_user -p
db_user is associated with the database in question. However, if you have a shared webhosting plan with a commerical webhost such as Justhost, Hostgator, and iPage, the webhost blocks you from accessing your databases in this way unless you're accessing them from your hosting server (in which case
host_address would be
localhost). To get around this, you have to explicitly whitelist the IP addresses you want to be able to access your databases remotely.
My question is, why? Is having access to the database restricted to specified user accounts (such as
db_user in the above example) not secure enough?