Comments - Troubleshooting Connection Issues
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
For debugging purposes, try connect directly with just the client first. If that works, you can try get it working in PHP. If not, it's a connection issue. Also note that mysql_connect has been deprecated since PHP 5.5.0, so really shouldn't be used anymore.