# random mysql error

**URL:** <https://discuss.rubyonrails.org/t/random-mysql-error/4090>\
**Category:** rubyonrails-talk\
**Created:** [November 6, 2006, 4:28am UTC](https://discuss.rubyonrails.org/t/random-mysql-error/4090 "2006-11-06T04:28:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chad](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Chad](https://discuss.rubyonrails.org/u/Chad)\
**Post date:** [November 6, 2006, 4:28am UTC](https://discuss.rubyonrails.org/t/random-mysql-error/4090/1 "2006-11-06T04:28:00Z")

</div>

Does anyone get the following error at random?

Mysql::Error: Lost connection to MySQL server during query: \<query here\>

It only happens on my development machine which, unfortunately, is a windows box. It happens like every 10 clicks, but varies. I've got MySQL 5.

Chad

---

<div class="post-metadata">

**Author:** ![Tim\_Trautmann](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Tim\_Trautmann](https://discuss.rubyonrails.org/u/Tim_Trautmann)\
**Post date:** [November 25, 2006, 11:08pm UTC](https://discuss.rubyonrails.org/t/random-mysql-error/4090/2 "2006-11-25T23:08:04Z")

</div>

Yep, getting these since upgrading to 1.2 RC1 but I’m also getting the errors on edge. I am still investigating as to what is causing this to happen.

Tim

---

<div class="post-metadata">

**Author:** ![Jason\_Garber](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Jason\_Garber](https://discuss.rubyonrails.org/u/Jason_Garber)\
**Post date:** [November 28, 2006, 6:39pm UTC](https://discuss.rubyonrails.org/t/random-mysql-error/4090/3 "2006-11-28T18:39:04Z")

</div>

We're experiencing the same thing with 1.2 RC1 also, but only on Windows machines. Hope someone figures it out before the release!

---

<div class="post-metadata">

**Author:** ![bphogan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/bphogan/32/4186_2.png) [@bphogan](https://discuss.rubyonrails.org/u/bphogan)\
**Post date:** [November 28, 2006, 6:59pm UTC](https://discuss.rubyonrails.org/t/random-mysql-error/4090/4 "2006-11-28T18:59:56Z")

</div>

It happens to us all the time on 1.1.6 so we use a different Rails adapter for MySQL

Follow the directions here and see if that helps. I understand they tickered with the ruby-only mysql adapter in 1.2 so this might still be a better option:

[http://www.vandomburg.net/pages/mysql-ruby-windows](http://www.vandomburg.net/pages/mysql-ruby-windows)

---

<div class="post-metadata">

**Author:** ![Jodi1](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@Jodi1](https://discuss.rubyonrails.org/u/Jodi1)\
**Post date:** [November 28, 2006, 7:15pm UTC](https://discuss.rubyonrails.org/t/random-mysql-error/4090/5 "2006-11-28T19:15:30Z")

</div>

check out this ticket:

[http://dev.rubyonrails.org/ticket/6687](http://dev.rubyonrails.org/ticket/6687)

Jodi

---

<div class="post-metadata">

**Author:** ![Jason\_Garber](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@Jason\_Garber](https://discuss.rubyonrails.org/u/Jason_Garber)\
**Post date:** [November 28, 2006, 8:23pm UTC](https://discuss.rubyonrails.org/t/random-mysql-error/4090/6 "2006-11-28T20:23:21Z")

</div>

I thought the problem was still occurring even after [5637], but it turns out we had vendor/rails frozen to the 1.2 tag instead of the 1.2 branch, so we didn't have the fix. It seems to be working fine now.

Thanks for your help! Jason
