mysql_pconnect([server[,username[,password]]])

Description: Opens a persistent connection to a MySQL server. Returns a resource identifier (referred to as link_identifier in this appendix) if a connection is made successfully, or FALSE otherwise.

server can be specified (optionally including :port for a port number, and optionally :/path/to/socket to give the path to a Unix socket), defaulting to localhost:3306 if not specified.

username can be specified, defaulting to the Unix user running the database server process if not given.

password can be specified, defaulting to the empty password if not given.

A persistent connection is held open even if mysql_close() is encountered or execution of the script finishes. The next time a script tries ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.