You are currently reading the 1.2 documentation. Switch to 2.2  2.1  2.0 

Examples

Example 1. Connect to database through a socket

mysql://user@unix(/path/to/socket)/pear

Example 2. Connect to database on a non standard port

pgsql://user:pass@tcp(localhost:5555)/pear

If you use, the IP address 127.0.0.1, the port parameter is ignored (default: 3306).

Example 3. Connect to SQLite on a Unix machine using options

sqlite:////full/unix/path/to/file.db?mode=0666

Example 4. Connect to SQLite on a Windows machine using options

sqlite:///c:/full/windows/path/to/file.db?mode=0666

Example 5. Connect to MySQLi using SSL

mysqli://user:pass@localhost/pear?key=client-key.pem&cert=client-cert.pem

Questions and Feedback

If you find a problem with the documentation or have a suggestion, please register and open a ticket.

If you need support or have a technical question, you can post to the user mailing-list.