I recommend using PHP's PDO or mysqli instead of mysql_connect as mysql_connect won't be supported for long and the community has already begun the deprecation process.