Let me explain it more thoroughly: 1) On the php side, you want to connect to your db server. This part has nothing to do with your IP. It completely depends on the db server IP. Therefore we used 192.168.1.20 in the mysql_connect function call.
2) On the mysql side, you want your db to accept connections from your machine. This completely depends on your machine (host), and has nothing to do with the IP assigned to your db server machine. Therefore we created a user at your host (192.168.1.21) to accept connections from. What most probably confused you here is the redundancy of the term host. For the mysql_connect function, the host is the db server. But when you got the db connection error, the msg came from the db server, and the host there meant your machine. So although the term was used twice, it had a different meaning depending on who used the term. your web server calls the db server a host, and your db server calls the web server a host. Just try to figure who issued the msg, and who is being referenced. -- Al-Faisal El-Dajani Phone: +962-7-79737050 P.O Box: 140056 11814 Amman, Jordan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Jordan PHP Users Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/JoPHP http://Jolug.org/ -~----------~----~----~----~------~----~------~--~---
