This is the what I can visualise at the moment:
MySQL server is running, which is an application that listens on a port (something I'm not 100% clear on at the moment).
The server parses PHP code, part of which involves sending input to the MySQL server (which is a completely separate program via specific ports (code written in the mysqli class?),
which then returns output that the mysqli class interprets? and these messages are interpreted into errors, or an established connection, or a successful query, etc?
Is this a reasonably correct view of MySQL/PHP communication?