how connect to mysql with socket or curl how connect to mysql with socket or curl curl curl

how connect to mysql with socket or curl


The protocol to communicate with MySQL is not HTTP, so you cannot use an HTTP client like cURL.

If you want to use sockets directly, then start with the PHP sockets library (the first thing you should do is to open a connection.

Then you'll need to implement the MySQL protocol, which is described in the manual.

That said, while you shouldn't use mysql_, there are good replacement libraries that exist already.