For cPanel - go to Databases section / Remote MySQL - add host or IP or set "%" for connection from any IP
For ISPmanager - Databases section / Select necessary БД / activate"Remote access"