Today I was unable to connect to mysql using mysql_connect function from php. I was able to use mysql database on command line, but not using mysql_connect function.
verified log files from
/etc/my.conf -> To Find where the mysql log files are stored
Mysql error log is store at /var/log/mysqld.log
Apache server log file.
/etc/httpd/conf/httpd.conf -> to find apache configuration file
Its log is store at /etc/httpd/logs/access_log or
Its log is store at /etc/httpd/logs/error_log
To install mysql with php use
yum install php-mysql