# Getting mysql gem to work with WAMP's MySQL

**URL:** <https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386>\
**Category:** Rails\
**Created:** [July 20, 2009, 10:33pm UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386 "2009-07-20T22:33:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 20, 2009, 10:33pm UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386/1 "2009-07-20T22:33:24Z")

</div>

I use WAMP and I don’t really want to install another MySQL just to  
work with Rails. How can I make the mysql gem use WAMP’s MySQL?

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 21, 2009, 12:42am UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386/2 "2009-07-21T00:42:38Z")

</div>

On Jul 20, 9:32 pm, Mike C [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I use WAMP and I don’t really want to install another MySQL just to  
> work with Rails. How can I make the mysql gem use WAMP’s MySQL?

as long as your app’s database.yml has the the port, ip address  
etc… of the instance of mysql you want it to use everything should  
just work. You might need to fiddle around with PATH settings so that  
windows can find the mysql dlls.

Fred

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 21, 2009, 3:32am UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386/3 "2009-07-21T03:32:42Z")

</div>

I just tried to use MySQL and it didn’t work. I even installed a new  
one and it still doesn’t work. Any ideas?

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 21, 2009, 4:32am UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386/4 "2009-07-21T04:32:18Z")

</div>

Hi Mike,

On Mon, 2009-07-20 at 18:31 -0700, Mike C wrote:

> I just tried to use MySQL and it didn’t work. I even installed a new  
> one and it still doesn’t work. Any ideas?

Post your database.yml config file and gem list.

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 21, 2009, 5:13am UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386/5 "2009-07-21T05:13:13Z")

</div>

This was fixed by copying the libmysql.dll located in the mysql  
installation location to the Ruby/bin directory. 🙂

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 21, 2009, 1:53am UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386/6 "2009-07-21T01:53:21Z")

</div>

Thanks. It’s just that when I tried to require ‘mysql’ in the irb, it  
gave me an error telling me the libmysql.dll or something couldn’t be  
found and that I’d need to reinstall/repair mysql.

On Jul 20, 3:41 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 21, 2009, 11:43am UTC](https://www.ruby-forum.com/t/getting-mysql-gem-to-work-with-wamps-mysql/172386/7 "2009-07-21T11:43:37Z")

</div>

Unfortunately, You can discover even more problems.

WAMP has a MySQL version: 5.1.36

and rails work best with: 5.0.X (for me worked with 26)

I don’t remember when these things happen, but You better keep that in  
mind 🙂

Martin
