Question :- All database details is correct but database is not connected in any application.Answer: The problem due the ” sql.safe_mode” is “On” in php.ini file.You need to turn off the sql.safe_mode in server php.ini file
#cat /usr/local/lib/php.ini |grep sql.safe_mode
sql.safe_mode = Off