Choosing a library

The mysqli and PDO_MySQL PHP extensions are lightweight wrappers on top of a C client library. The extensions can either use the mysqlnd library or the libmysqlclient library. Choosing a library is a compile time decision.

The mysqlnd library is part of the PHP distribution. It offers features like lazy connections and query caching, features that are not available with libmysqlclient, so using the built-in mysqlnd library is highly recommended. See the mysqlnd documentation for additional details, and a listing of features and functionality that it offers.

Beispiel #1 Configure commands for using mysqlnd or libmysqlclient

// Recommended, compiles with mysqlnd
$ ./configure --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

// Alternatively recommended, compiles with mysqlnd
$ ./configure --with-mysqli --with-pdo-mysql

// Not recommended, compiles with libmysqlclient
$ ./configure --with-mysqli=/path/to/mysql_config --with-pdo-mysql=/path/to/mysql_config

Library feature comparison

It is recommended to use the mysqlnd library instead of the MySQL Client Server library (libmysqlclient). Both libraries are supported and constantly being improved.

  MySQL native driver (mysqlnd) MySQL client server library (libmysqlclient)
Part of the PHP distribution Yes No
PHP version introduced 5.3.0 N/A
License PHP License 3.01 Dual-License
Development status Active Active
Lifecycle No end announced No end announced
Compile default (for all MySQL extensions) Yes No
Compression protocol support Yes Yes
SSL support Yes Yes
Named pipe support Yes Yes
Non-blocking, asynchronous queries Yes No
Performance statistics Yes No
LOAD LOCAL INFILE respects the open_basedir directive Yes No
Uses PHP's native memory management system (e.g., follows PHP memory limits) Yes No
Return numeric column as double (COM_QUERY) Yes No
Return numeric column as string (COM_QUERY) Yes Yes
Plugin API Yes Limited
Automatic reconnect No Optional

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

Aufsatz

Hallo! Ich wollte meine Entdeckung mit euch teilen - Ghostwriter​ (https://wirschreiben.at/) . Diese Seite ist eine echte Oase für Schriftstell ...

Geschrieben von Faraon23 am 08.06.2023 21:04:40
Forum: Apps und PHP Script Gesuche
Aufsatz schreiben

Brauchen Sie Hilfe bei Ihrem Aufsatz? Ich kann Ihnen mit einer Empfehlung weiterhelfen und Sie über diesen Dienst informieren Ghostwriter Deutsch ...

Geschrieben von Faraon23 am 07.06.2023 18:56:39
Forum: Apps und PHP Script Gesuche
Welche Ghostwriter Agentur kontaktieren?

WirWRITE ist eine aussergewöhnliche Plattform, die Menschen in der Schweiz mit Erfahrene und seriöse Ghostwriter für alle Fachbereiche​ (http ...

Geschrieben von John534 am 07.06.2023 15:39:37
Forum: Off-Topic Diskussionen
Formular- Antwort

Das war es, ich musste der Datei einfach nur wieder :)den Originalnamen geben. Nun funktioniert es perfekt. Danke.

Geschrieben von Dirk66 am 21.05.2023 18:19:21
Forum: PHP Developer Forum