Your forum software should have a config, configuration, settings ( .ini or .php ) file.
Open it and make sure the database host is set to 'localhost' . Nothing else.
If that does not work, go to cPanel, mySQL Databases, drop the user (do not delete), add him back giving him All Permissions...