I understand this can be a newb question, however i looked the archives and could not locate an exact response to this. Then when a php script operates and also the php interpreter parses the script and finds code that states open a database connection and execute a query, so how exactly does this really happen? What continues without anyone's knowledge that really satisfies this request?
The PHP script contacts the MySQL server in the same manner you would employ the web, just with another protocol (rather than HTTP it uses MySQL's syntax). Should you set the server to localhost it does not really need to use the web however it still does exactly the same stuff, just offline, in the same manner just like you speak to your own localhost via your browser. The information came back is distributed to the PHP script.
Like how HTTP uses port 80, MySQL uses port 3306. You can really contact MySQL yourself outdoors of PHP technically.
i am not sure im 100% correct :/
i believe the reply is, when apache is loaded(began) the httpd deamon inspections the php.ini file and loads in the various dlls which are set with LoadModule eg "LoadModule ssl_module modules/mod_ssl.so" and all sorts of the the dlls in the bin directory "take a look" there are many dll for the majority of the methods, during this situation whenever a mysql statement is passed with the purser libmysql.dll handles the internals.