[Rails] Connecting to MySQL

Scott Barron scott at elitists.net
Wed Nov 10 16:28:42 GMT 2004


On Wed, Nov 10, 2004 at 04:13:55PM +0000, rubyonrails at freeze.org wrote:
> Hi
> 
> It just occured to me that I didn't know how raile (Activerecord actually)
> connects to a MySQL server, so I went and checked out the code.
> To my surprise, it looks like activerecord is writing socket code
> to connect directly to the server and not using some mysql or
> dbi layer. Very impressive.

Hi,

In the case of MySQL, ActiveRecord ships with a Ruby implementation of
the library, OR it can use the C version which you can download
separately.  I can't speak of speed differences since I use PostgreSQL,
but there are those two options available for MySQL.

-Scott


More information about the Rails mailing list