@@ -49,26 +49,14 @@ The path after the authority part represents the name of the
49
49
database, sans the leading slash. Any query parameters are used as
50
50
additional connection parameters.
51
51
52
- The scheme names representing the drivers are either the regular
53
- driver names (see below) with any underscores in their name replaced
54
- with a hyphen (to make them legal in URL scheme names), or one of the
55
- following simplified driver names that serve as aliases:
56
-
57
- - ``db2 ``: alias for ``ibm_db2 ``
58
- - ``mssql ``: alias for ``pdo_sqlsrv ``
59
- - ``mysql ``/``mysql2 ``: alias for ``pdo_mysql ``
60
- - ``pgsql ``/``postgres ``/``postgresql ``: alias for ``pdo_pgsql ``
61
- - ``sqlite ``/``sqlite3 ``: alias for ``pdo_sqlite ``
62
-
63
- For example, to connect to a "foo" MySQL DB using the ``pdo_mysql ``
52
+ The scheme names representing the drivers are the driver names
53
+ with any underscores in their name replaced with a hyphen
54
+ (to make them legal in URL scheme names).
55
+
56
+ For example, to connect to a "foo" MySQL database using the ``pdo_mysql ``
64
57
driver on localhost port 4486 with the "charset" option set to ``utf8mb4 ``,
65
58
you would use the following URL::
66
59
67
- mysql://localhost:4486/foo?charset=utf8mb4
68
-
69
- This is identical to the following connection string using the
70
- full driver name::
71
-
72
60
pdo-mysql://localhost:4486/foo?charset=utf8mb4
73
61
74
62
In the example above, mind the dashes instead of the
@@ -79,28 +67,28 @@ URL is obviously irrelevant and thus can be omitted. The path part
79
67
of the URL is, like for all other drivers, stripped of its leading
80
68
slash, resulting in a relative file name for the database::
81
69
82
- sqlite:///somedb.sqlite
70
+ pdo- sqlite:///somedb.sqlite
83
71
84
72
This would access ``somedb.sqlite `` in the current working directory
85
73
and is identical to the following::
86
74
87
- sqlite://ignored:ignored@ignored:1234/somedb.sqlite
75
+ pdo- sqlite://ignored:ignored@ignored:1234/somedb.sqlite
88
76
89
77
To specify an absolute file path, e.g. ``/usr/local/var/db.sqlite ``,
90
78
simply use that as the database name, which results in two leading
91
79
slashes for the path part of the URL, and four slashes in total after
92
80
the URL scheme name and its following colon::
93
81
94
- sqlite:////usr/local/var/db.sqlite
82
+ pdo- sqlite:////usr/local/var/db.sqlite
95
83
96
84
Which is, again, identical to supplying ignored user/pass/authority::
97
85
98
- sqlite://notused:inthis@case//usr/local/var/db.sqlite
86
+ pdo- sqlite://notused:inthis@case//usr/local/var/db.sqlite
99
87
100
88
To connect to an in-memory SQLite instance, use ``:memory: `` as the
101
89
database name::
102
90
103
- sqlite:///:memory:
91
+ pdo- sqlite:///:memory:
104
92
105
93
.. note ::
106
94
0 commit comments