Unable to connect to database
There may be various reasons as to why you may get the Unable to connect to database error.
Solutions
The most common cause of this issue is an incorrectly downloaded integration file. If you are integrating CometChat with WordPress and you select BuddyPress from the drop-down menu before download, the installation will not work correctly.
The CometChat folder must be uploaded to the correct directory. Please make sure you upload it to the software root folder.
If you are integrating CometChat with a custom site, you will have to manually edit integration.php and add the database details. Do not make this modification if you are using any ready-to-use integration like WordPress, vBulletin etc.