I have an apache server on one machine and a mysql on another server. the web server cannot connect to the mysql db.
this is the error:
I have set up the grant tables the exact same way I have always done it in the past.
Both servers are on the same internal network. It seems like the web server can see the mysql server because it returns a mysql error. so I'm assuming that its not a network or firewall issue. I don't think its my connection script, because I can connect to a database on a testing (dev) server.
this is my php connection script:
webserver: 10.4.87.240
mysql: 10.4.87.241
Is this a problem with my network (ie firewall configuration), or a problem with my mysql grant tables, or a problem with my php connection script? I've never gotten this error before. I'm kinda stuck right now. Any help would be greatly appreciated.
Thanks
this is the error:
| Quote: |
| Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /usr/local/apache/htdocs/config.php on line 6
error connecting to mysql:Lost connection to MySQL server during query |
I have set up the grant tables the exact same way I have always done it in the past.
| Code: |
| GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO user@"%"
-> IDENTIFIED BY 'password'; |
Both servers are on the same internal network. It seems like the web server can see the mysql server because it returns a mysql error. so I'm assuming that its not a network or firewall issue. I don't think its my connection script, because I can connect to a database on a testing (dev) server.
this is my php connection script:
webserver: 10.4.87.240
mysql: 10.4.87.241
| Code: |
| <?php
$host="10.4.87.241"; $user="user"; $password="password"; $db="database"; $conn=mysql_connect($host,$user,$password) or die ("error connecting to mysql:".mysql_error()); $select_db = mysql_select_db($db,$conn) or die (mysql_error()); ?> |
Is this a problem with my network (ie firewall configuration), or a problem with my mysql grant tables, or a problem with my php connection script? I've never gotten this error before. I'm kinda stuck right now. Any help would be greatly appreciated.
Thanks
