class MysqlAdapter

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v3.0.20

Available in: v2.2.3 v2.3.18 v3.0.20

The MySQL adapter will work with both Ruby/MySQL, which is a Ruby-based MySQL adapter that comes bundled with Active Record, and with the faster C-based MySQL/Ruby adapter (available both as a gem and from www.tmtm.org/en/mysql/ruby/).

Options:

  • :host - Defaults to “localhost”.

  • :port - Defaults to 3306.

  • :socket - Defaults to “/tmp/mysql.sock”.

  • :username - Defaults to “root”

  • :password - Defaults to nothing.

  • :database - The name of the database. No default, must be provided.

  • :encoding - (Optional) Sets the client encoding by executing “SET NAMES <encoding>” after connection.

  • :reconnect - Defaults to false (See MySQL documentation: dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html).

  • :sslca - Necessary to use MySQL with an SSL connection.

  • :sslkey - Necessary to use MySQL with an SSL connection.

  • :sslcert - Necessary to use MySQL with an SSL connection.

  • :sslcapath - Necessary to use MySQL with an SSL connection.

  • :sslcipher - Necessary to use MySQL with an SSL connection.

Inherits from

ActiveRecord::ConnectionAdapters::AbstractAdapter

Constants

Methods (defined here)

Private methods

(6) Implementation detail — not part of the public API.

Methods (inherited)

From ActiveRecord::ConnectionAdapters::AbstractAdapter (27)
From ActiveRecord::ConnectionAdapters::DatabaseLimits (10)
From ActiveRecord::ConnectionAdapters::QueryCache (7)
From ActiveSupport::Callbacks (2)
From Object (37)
From ActiveSupport::Callbacks::ClassMethods (1)
From Benchmark (2)

Type at least 2 characters to search.

↑↓ navigate · open · esc close