Mysql Ruby Connector

Mysql connector net 8 0 is compatible with all mysql versions starting with mysql 5 6.
Mysql ruby connector. C wrapper for mysql c api mysql. Mysql connectors provide connectivity to the mysql server for client programs. This module is also included in the ruby on rails distribution. For information on installing and using the mysql ruby api see section 27 11 1 the mysql ruby api.
Ruby mysql is written in pure ruby and implements mostly the same interface as mysql ruby. The mysql ruby module provides access to mysql databases using ruby through libmysqlclient. Mysql ruby is built on top of the mysql c api and provides the same functions for ruby programs that the mysql c api provides for c programs. The do mysql gem also converts mysql fields types but has a considerably more complex api and is still 2x slower than mysql2.
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. It is a multi user multithreaded database management system. 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. Mysql is a leading open source database management system.
The mysql c api. The mysql ruby api is based on the libmysqlclient api library. There are two modules for connecting to a mysql database server from ruby. The ruby mysql api is written to use the native mysql network protocol a native driver.
Apis provide low level access to the mysql protocol and mysql resources. See also 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. Mysql connector net installation instructions.
Mysql is especially popular on the web. Mysql connectors mysql provides standards based drivers for jdbc odbc and net enabling developers to build database applications in their language of choice. Ruby driver for mysql ruby mysql download. A number of programmer s utilities are available to help with the process.
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 and. For information on installing the module and the functions exposed see mysql ruby. In addition a native c library allows developers to embed mysql directly into their applications. It is on part of the very popular lamp platform consisting of linux apache mysql and php.
The mysql gem returns only nil or string data types leaving you to convert field values to ruby types in ruby land which is much slower than mysql2 s c code. Connector net is a fully managed ado net driver for mysql.