Setup:
Two separate boxes:
- Fedora 15, Apache, PHP and PHP modules
- Fedora 15, MySQL
I am unable to make a connection to MySQL from the Apache web server.
<?php echo "<br>begin test<br>"; mysql_connect('hostname[FQDN]','username','password') or ("Error" . mysql_error()); echo "<br>end test<br>"; ?> the 'begin test' text is being displayed but no MySQL error or the 'end test' text when Apache serves the page.
I am able to connect to the MySQL DB using the MySQL workbench on port 3306 from a remote machine. Privileges and access to the user and IP address have been left completely open (%) to avoid any issues in those respects.
yum install php-mysql/var/log/httpd/error_log