You can view whether your account is using localhost or remotemysql host in your cPanel account. Click on 'phpMyAdmin', in the 'Databases' menu. Your database host will be displayed on the next screen after Server. It will be listed as localhost or remotemysql host.