Manuale PHP
Indietro |  | Avanti

# PDO_MYSQL DSN

(no version information, might be only in CVS)

PDO_MYSQL DSN -- Connecting to MySQL databases

## Descrizione

The PDO_MYSQL Data Source Name (DSN) is composed of the following elements:

DSN prefix

  The DSN prefix is `mysql:`.

`host`

  The hostname on which the database server resides.

`dbname`

  The name of the database.

## Esempi

Esempio 1. PDO_MYSQL DSN examples

The following example shows a PDO_MYSQL DSN for connecting to MySQL databases:

    mysql:host=localhost;dbname=testdb

Indietro | Partenza | Avanti
MySQL Functions (PDO_MYSQL) | Risali | MySQL Improved Extension