PDO_MYSQL DSN

(PECL PDO_MYSQL >= 0.1.0)

PDO_MYSQL DSNConnecting to MySQL databases

Beschreibung

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.

port

The port number where the database server is listening.

dbname

The name of the database.

unix_socket

The MySQL Unix socket (shouldn't be used with host or port).

charset

The character set. See the character set concepts documentation for more information.

Beispiele

Beispiel #1 PDO_MYSQL DSN examples

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

mysql:host=localhost;dbname=testdb
More complete examples:
mysql:host=localhost;port=3307;dbname=testdb
mysql:unix_socket=/tmp/mysql.sock;dbname=testdb

Anmerkungen

Hinweis: Unix only:

When the host name is set to "localhost", then the connection to the server is made through a domain socket. If PDO_MYSQL is compiled against libmysqlclient then the location of the socket file is at libmysqlclient's compiled in location. If PDO_MYSQL is compiled against mysqlnd a default socket can be set through the pdo_mysql.default_socket setting.

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

PHPUnit in der Version 10 erschienen

Das beliebte Testframeworks PHPUnit ist in der Version 10 erschienen und steht zum Download bereit ...

TheMax

Autor : TheMax
Kategorie: Software & Web-Development

Laravel 10 veröffentlicht

Laravel Version 10 steht mit einer Mindestanforderung von PHP 8.1 zum Download bereit. ...

admin

Autor : admin
Kategorie: Software & Web-Development

DeepL Erweiterung Write als beta veröffentlicht

DeepL hat eine neuen Dienst Namens „write“ veröffentlicht, der die Rechtschreibung und Grammatik mit KI verbessern soll. ...

admin

Autor : admin
Kategorie: Dies und Das

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Restart the Stream for Fubo TV

The issue could be with a particular channel streaming. Turn off the stream you are facing issues with and try another channel. If that channel st ...

Geschrieben von hensen5005 am 28.05.2023 00:19:38
Forum: Fragen/Vorschläge zum Forum
Check internet speed for smooth function of Fubo TV

Quite often, problems with streaming applications are related to slow internet speeds. So try using other apps like Youtube and check whether your ...

Geschrieben von hensen5005 am 28.05.2023 00:11:16
Forum: Fragen/Vorschläge zum Forum
Reinstall or update the application Fubo App

Much like other applications, Fubotv/connect (https://www.fubo-connect.com/) also receives updates over time. So if there is any pending update fo ...

Geschrieben von hensen5005 am 28.05.2023 00:02:36
Forum: Fragen/Vorschläge zum Forum
Peacock offers faster access to Universal films

In July 2021, Universal released The Boss Baby 2 in theaters, and also for paid subscribers to Peacock on the same day. It did the same in October ...

Geschrieben von hensen5005 am 27.05.2023 23:51:25
Forum: Fragen/Vorschläge zum Forum