# Gem mysql on windows problem

**URL:** <https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000>\
**Category:** Ruby\
**Created:** [September 15, 2010, 7:03am UTC](https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000 "2010-09-15T07:03:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_joo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jason\_joo](https://www.ruby-forum.com/u/jason_joo)\
**Post date:** [September 15, 2010, 7:03am UTC](https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000/1 "2010-09-15T07:03:44Z")

</div>

hi guys  
I used to running ruby apps on ubuntu but someone else would running  
them on  
win32.  
recently I find a problem in gem “mysql” on ruby 1.9.2.  
I connect, query, query.  
but it seems that the connection aborts when the first query completes  
and  
then the second query ends with error “not connected”.

this issue seems to exist on win32 only.

is there any solution?

thanks  
jason

---

<div class="post-metadata">

**Author:** ![jason\_joo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jason\_joo](https://www.ruby-forum.com/u/jason_joo)\
**Post date:** [September 15, 2010, 5:26pm UTC](https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000/2 "2010-09-15T17:26:01Z")

</div>

On Sep 15, 2:03 am, jason joo [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> this issue seems to exist on win32 only.
> 
> is there any solution?

On Linux you compile everything, on Windows there are binary gems  
provided, so:

Specifically what version of Ruby (ruby -v) are you talking about?

What version of mysql gem did you installed?

Is the MySQL server local? What version of MySQL is?

Have you copied libmysql.dll into Ruby\bin as described by  
RubyInstaller tutorials?

> **[Tutorials](https://github.com/oneclick/rubyinstaller/wiki/Tutorials)**
>
> RubyInstaller for Windows - Build recipes. Contribute to oneclick/rubyinstaller development by creating an account on GitHub.

If so, what version of libmysql.dll have you copied?

Help us help you.

---

<div class="post-metadata">

**Author:** ![jason\_joo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jason\_joo](https://www.ruby-forum.com/u/jason_joo)\
**Post date:** [September 17, 2010, 7:40am UTC](https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000/3 "2010-09-17T07:40:37Z")

</div>

yeah, it works !  
thanks a lot  
though I have used the one-click-installer the “libmysql.dll” is not  
contained in it  
so I feel confused that why not publishing the installer with it if the  
bin  
file require a centain version one?

thanks again  
jason

2010/9/15 Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![jason\_joo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c6cbf5/32.png) [@jason\_joo](https://www.ruby-forum.com/u/jason_joo)\
**Post date:** [September 17, 2010, 4:07pm UTC](https://www.ruby-forum.com/t/gem-mysql-on-windows-problem/195000/4 "2010-09-17T16:07:00Z")

</div>

On Sep 17, 2:39 am, jason joo [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [Note: parts of this message were removed to make it a legal post.]
> 
> yeah, it works !  
> thanks a lot  
> though I have used the one-click-installer the “libmysql.dll” is not  
> contained in it  
> so I feel confused that why not publishing the installer with it if the bin  
> file require a centain version one?

No MySQL libraires are included in the installers, is up to you.

The libmysql.dll used with mysql binary gem needs to be 5.0.x, attempt  
to use 5.1.x versions of the DLL will results in segfaults due  
internal MySQL changes.
