Rechercher dans le manuel MySQL
Chapter 28 Connectors and APIs
Table of Contents [+/-]
- 28.1 MySQL Connector/C
- 28.2 MySQL Connector/C++
- 28.3 MySQL Connector/J
- 28.4 MySQL Connector/NET
- 28.5 MySQL Connector/ODBC
- 28.6 MySQL Connector/Python
- 28.7 MySQL C API [+/-]
- 28.7.1 MySQL C API Implementations
- 28.7.2 Simultaneous MySQL Server and Connector/C Installations
- 28.7.3 Example C API Client Programs
- 28.7.4 Building and Running C API Client Programs
- 28.7.5 C API Data Structures
- 28.7.6 C API Function Overview
- 28.7.7 C API Function Descriptions
- 28.7.8 C API Prepared Statements
- 28.7.9 C API Prepared Statement Data Structures
- 28.7.10 C API Prepared Statement Function Overview
- 28.7.11 C API Prepared Statement Function Descriptions
- 28.7.12 C API Asynchronous Interface
- 28.7.13 C API Asynchronous Interface Data Structures
- 28.7.14 C API Asynchronous Function Overview
- 28.7.15 C API Asynchronous Function Descriptions
- 28.7.16 C API Threaded Function Descriptions
- 28.7.17 C API Client Plugin Functions
- 28.7.18 C API Binary Log Interface
- 28.7.19 C API Binary Log Data Structures
- 28.7.20 C API Binary Log Function Overview
- 28.7.21 C API Binary Log Function Descriptions
- 28.7.22 C API Encrypted Connection Support
- 28.7.23 C API Multiple Statement Execution Support
- 28.7.24 C API Prepared Statement Handling of Date and Time Values
- 28.7.25 C API Prepared CALL Statement Support
- 28.7.26 C API Prepared Statement Problems
- 28.7.27 C API Optional Result Set Metadata
- 28.7.28 C API Automatic Reconnection Control
- 28.7.29 C API Common Issues
- 28.8 MySQL PHP API
- 28.9 MySQL Perl API
- 28.10 MySQL Python API
- 28.11 MySQL Ruby APIs [+/-]
- 28.12 MySQL Tcl API
- 28.13 MySQL Eiffel Wrapper
MySQL Connectors provide connectivity to the MySQL server for client programs. APIs provide low-level access to the MySQL protocol and MySQL resources. Both Connectors and the APIs enable you to connect and execute MySQL statements from another language or environment, including ODBC, Java (JDBC), Perl, Python, PHP, Ruby, and native C MySQL instances.
MySQL Connectors
Oracle develops a number of connectors:
Connector/C is a standalone replacement for the MySQL Client Library (
libmysqlclient
), to be used for C applications.Connector/C++ enables C++ applications to connect to MySQL.
Connector/J provides driver support for connecting to MySQL from Java applications using the standard Java Database Connectivity (JDBC) API.
Connector/NET enables developers to create .NET applications that connect to MySQL. Connector/NET implements a fully functional ADO.NET interface and provides support for use with ADO.NET aware tools. Applications that use Connector/NET can be written in any supported .NET language.
MySQL for Visual Studio works with Connector/NET and Microsoft Visual Studio 2012, 2013, 2015, and 2017. MySQL for Visual Studio provides access to MySQL objects and data from Visual Studio. As a Visual Studio package, it integrates directly into Server Explorer providing the ability to create new connections and work with MySQL database objects.
Connector/ODBC provides driver support for connecting to MySQL using the Open Database Connectivity (ODBC) API. Support is available for ODBC connectivity from Windows, Unix, and OS X platforms.
Connector/Python provides driver support for connecting to MySQL from Python applications using an API that is compliant with the Python DB API version 2.0. No additional Python modules or MySQL client libraries are required.
The MySQL C API
For direct access to using MySQL natively within a C application,
the C API provides low-level access to
the MySQL client/server protocol through the
libmysqlclient
client library. This is the
primary method used to connect to an instance of the MySQL server,
and is used both by MySQL command-line clients and many of the MySQL
Connectors and third-party APIs detailed here.
libmysqlclient
is included in MySQL distributions
and in Connector/C distributions.
See also Section 28.7.1, “MySQL C API Implementations”.
To access MySQL from a C application, or to build an interface to MySQL for a language not supported by the Connectors or APIs in this chapter, the C API is where to start. A number of programmer's utilities are available to help with the process; see Section 4.7, “MySQL Program Development Utilities”.
Third-Party MySQL APIs
The remaining APIs described in this chapter provide an interface to MySQL from specific application languages. These third-party solutions are not developed or supported by Oracle. Basic information on their usage and abilities is provided here for reference purposes only.
All the third-party language APIs are developed using one of two
methods, using libmysqlclient
or by implementing
a native driver. The two
solutions offer different benefits:
Using
libmysqlclient
offers complete compatibility with MySQL because it uses the same libraries as the MySQL client applications. However, the feature set is limited to the implementation and interfaces exposed throughlibmysqlclient
and the performance may be lower as data is copied between the native language, and the MySQL API components.Native drivers are an implementation of the MySQL network protocol entirely within the host language or environment. Native drivers are fast, as there is less copying of data between components, and they can offer advanced functionality not available through the standard MySQL API. Native drivers are also easier for end users to build and deploy because no copy of the MySQL client libraries is needed to build the native driver components.
Table 28.1, “MySQL APIs and Interfaces” lists many of the libraries and interfaces available for MySQL.
Table 28.1 MySQL APIs and Interfaces
Environment | API | Type | Notes |
---|---|---|---|
Ada | GNU Ada MySQL Bindings | libmysqlclient |
See MySQL Bindings for GNU Ada |
C | C API | libmysqlclient |
See Section 28.7, “MySQL C API”. |
C | Connector/C | Replacement for libmysqlclient |
See MySQL Connector/C Developer Guide. |
C++ | Connector/C++ | libmysqlclient |
See MySQL Connector/C++ 8.0 Developer Guide. |
MySQL++ | libmysqlclient |
See MySQL++ website. | |
MySQL wrapped | libmysqlclient |
See MySQL wrapped. | |
Cocoa | MySQL-Cocoa | libmysqlclient |
Compatible with the Objective-C Cocoa environment. See http://mysql-cocoa.sourceforge.net/ |
D | MySQL for D | libmysqlclient |
See MySQL for D. |
Eiffel | Eiffel MySQL | libmysqlclient |
See Section 28.13, “MySQL Eiffel Wrapper”. |
Erlang | erlang-mysql-driver |
libmysqlclient |
See
erlang-mysql-driver . |
Haskell | Haskell MySQL Bindings | Native Driver | See Brian O'Sullivan's pure Haskell MySQL bindings. |
hsql-mysql |
libmysqlclient |
See MySQL driver for Haskell. | |
Java/JDBC | Connector/J | Native Driver | See MySQL Connector/J 5.1 Developer Guide. |
Kaya | MyDB | libmysqlclient |
See MyDB. |
Lua | LuaSQL | libmysqlclient |
See LuaSQL. |
.NET/Mono | Connector/NET | Native Driver | See MySQL Connector/NET Developer Guide. |
Objective Caml | OBjective Caml MySQL Bindings | libmysqlclient |
See MySQL Bindings for Objective Caml. |
Octave | Database bindings for GNU Octave | libmysqlclient |
See Database bindings for GNU Octave. |
ODBC | Connector/ODBC | libmysqlclient |
See MySQL Connector/ODBC Developer Guide. |
Perl | DBI /DBD::mysql |
libmysqlclient |
See Section 28.9, “MySQL Perl API”. |
Net::MySQL |
Native Driver | See
Net::MySQL
at CPAN |
|
PHP | mysql , ext/mysql interface
(deprecated) |
libmysqlclient |
See Original MySQL API. |
mysqli , ext/mysqli interface |
libmysqlclient |
See MySQL Improved Extension. | |
PDO_MYSQL |
libmysqlclient |
See MySQL Functions (PDO_MYSQL). | |
PDO mysqlnd | Native Driver | ||
Python | Connector/Python | Native Driver | See MySQL Connector/Python Developer Guide. |
Python | Connector/Python C Extension | libmysqlclient |
See MySQL Connector/Python Developer Guide. |
MySQLdb | libmysqlclient |
See Section 28.10, “MySQL Python API”. | |
Ruby | MySQL/Ruby | libmysqlclient |
Uses libmysqlclient . See
Section 28.11.1, “The MySQL/Ruby API”. |
Ruby/MySQL | Native Driver | See Section 28.11.2, “The Ruby/MySQL API”. | |
Scheme | Myscsh |
libmysqlclient |
See
Myscsh . |
SPL | sql_mysql |
libmysqlclient |
See
sql_mysql
for SPL. |
Tcl | MySQLtcl | libmysqlclient |
See Section 28.12, “MySQL Tcl API”. |
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 26/06/2006, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/mysql-rf-connectors-apis.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.