Step 1: Log into cPanel account.
Step 2: Click the Remote MySQL icon, under Databases.
Step 3: Type in the connecting IP address, and click the Add Host button.
Step 4: Click Add, and you should now be able to connect remotely to your database.
Step 5: Now you have removed database access from remoteserver.