Topic: MySQL problem - Invalid access to memory location

I'm having a problem running rails with MySQL.

Here's my setup:
ruby  1.8.6
rails 2.2.2
mysql 5.0.41
OS    WinXP SP2

When I try to build a simple rails app and navigate to a page, I get an "Invalid access to memory location" error. I tried a simple activerecord script:
--------
require "activerecord"

ActiveRecord::Base.establish_connection(
    :adapter => "mysql",
    :host => "localhost",
    :username => "root",
    :password => "root",
    :database => "simple_db")

class Account < ActiveRecord::Base
end

account = Account.new
account.username = "test"
account.save
--------

When I run it I get this error:

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
C:/ruby/ruby-1.8.6/lib/ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so: 998: Invalid access to memory location.   - C:/ruby/ruby-1.8.6/lib/ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin3
2/ext/mysql.so (LoadError)

I tried "gem install mysql", but this doesn't change anything.

I read on one post that I should add %mysql_home%/bin/libmySQL.dll to %ruby_home%/bin. I tried this, but still no luck.

Any other suggestions?

Re: MySQL problem - Invalid access to memory location

Looks like this is purely a mysql bug:

http://forums.mysql.com/read.php?116,15 … msg-155279

http://bugs.mysql.com/bug.php?id=28358

Re: MySQL problem - Invalid access to memory location

Tried upgrading to MySQL v.5.1. Doesn't help.

I realize now that there was a mysql/ruby v.2.8 available on rubyforge.org which is certified up to MySQL v.5.0.51a. Unfortunately, I uninstalled my old MySQL in favour ov v.5.1. Bad move. It seems the only MySQL v.5.0 version available at mysql.com is v.5.0.67.

Darn it!