PHP opens a connection to port 3306 - it is a server over TCP to allow data transfer. Therefore, you can specify which port to connect to in mysql (i) _connect, etc., and why you need to have firewall rules for mysql.
This is the same on Windows as Linux
So yes, TCP :)
EDIT: Edition. On linux, php looks for a connection to mysql via /tmp/mysql.sock. The tmp directory must have the correct permissions.
source
share