4.1. MySQL Client Interfaces


MySQL AB provides several application programming interfaces (APIs) for accessing the MySQL server. The interface included with distributions of MySQL itself is libmysqlclient, the C client library. This API may be used for writing MySQL-based C programs. It is also the basis for most higher-level APIs written for other languages (the Java and .NET interfaces are notable exceptions).

MySQL AB also provides drivers that aren't programs in themselves, but act as bridges to the MySQL server for client programs that communicate using a particular protocol. These drivers comprise the family of MySQL Connectors. They are available as separate packages.

  • MySQL Connector/ODBC provides a MySQL-specific driver for ODBC. It allows ODBC-compliant programs to access MySQL.

  • MySQL Connector/J is a JDBC driver for use in Java programs. It allows JDBC-compliant programs to access MySQL.

  • MySQL Connector/NET is a driver written in C# that supports the ADO.NET interfaces required to run .NET applications that access MySQL.

The MySQL connectors are available for Windows and Unix. To use a connector, you must install it on the client host. It isn't necessary for the server to be running on the same machine or for the server to be running the same operating system as the client. This means that MySQL connectors are very useful for providing MySQL connectivity in heterogeneous environments. For example, people who use Windows machines can run client applications that access MySQL databases located on a Linux server host.

Each of the preceding APIs is officially supported by MySQL AB. In addition, many third-party client interfaces are available. Most of them are based on the C client library and provide a binding for some other language. These include the mysql and mysqli extensions for PHP, the DBD::mysql driver for the Perl DBI module, and interfaces for other languages such as Python, Ruby, Pascal, and Tcl. Although you can download these client APIs from the MySQL Web site and members of the MySQL AB development team often work closely with the developers of these products, the APIs do not receive official support from MySQL AB. If you're embarking on a project that involves these APIs, you should contact the developers to determine whether future support will be available.



MySQL 5 Certification Study Guide
MySQL 5.0 Certification Study Guide
ISBN: 0672328127
EAN: 2147483647
Year: 2006
Pages: 312

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net