Jump to content

Problem connecting to a remote database


jose.natali

Recommended Posts

Can somebody help?

 

Here is the info:

 

Two computer, Fedore core 6 OS, php 5, apache 2, MySQL 5

Every computer 2 NICs, first     NIC 10/100         (192.168 network),

                               second NIC 10/100/1000 (10.0 network)

 

Computers are behind of PfSense firewall only in the 192.168 network. (extra info, just in case)

 

computer one = node01 (Web Server),

computer two = node02 (MySQL Server)

 

node02 - acount create in MySQL Server for node01

node01 - can access MySQL Server using terminal->mysql client, no problems!  ;D

 

When I try to do connection to node02 using PHP I get the message in the logs, that the connection can not be establish to 10.0.0.x.  >:(

 

I especified in the code the ip address for the host, the user, and the password for MySQL server.

 

What can be the problem? if somebody have an idea, please help me.

Link to comment
Share on other sites

Thanks for a fast response.  Yes, I'm sure. As I said, I'm able to connect

from node01 to node02 using mysql client.

i.e.: mysql -h 10.0.0.1 -u username -p

or mysql --host=10.0.0.1 --user=username --password=password

 

connection is established and I have full access in this way, but not using my

webserver with php.  any ideas??? May be relate somehow, that I'm using

a NIC#1 for access the webserver and NIC#2 for PHP to access the database?  ???

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.