#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0

    Connecting apache server to mysql server


    Hello everyone,

    I have 2 (virtual) servers at the moment,
    An Apache server with windows 2008 server (with Apache installed),
    and a MySQL server with windows 2008 server (with MySQL installed)

    I got the apache server up and running with PHP, and everything works well except te connection between te apache and the Mysql server. Can anyone please tell me how i can connect my apache server with my MySQL server? I heard someone talking about porting or something.

    The Apache server has IP 192.168.7.2
    the Mysql server has IP 192.168.7.3

    Both servers are on a internal network.

    I really hope someone can help me out. I tried looking on the internet but i can't find something usefull (or im looking in the wrong places)

    Thx in advance
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,745
    Rep Power
    9397
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0
    Well what i want to achieve is actually hosting a website. I use apache to host the website, and use Mysql for the databases
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,298
    Rep Power
    7170
    In that case what you're actually doing is connecting the programming language to your MySQL server, it has nothing to do with Apache directly. So this is either a PHP program or a MySQL problem.

    What error do you get in PHP when you try to connect?
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    4
    Rep Power
    0
    ok the problem im facing is that the website im hosting on the apache server cant connect to the database on the MySQL server.
    he cant seem to find it while the servers are both on the right domain and see eachother in the network

IMN logo majestic logo threadwatch logo seochat tools logo