# Mysql::Error: Lost connection to MySQL server during query

**URL:** <https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query/129178>\
**Category:** Rails\
**Created:** [February 15, 2008, 3:51am UTC](https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query/129178 "2008-02-15T03:51:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![giorgio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Post date:** [February 15, 2008, 3:51am UTC](https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query/129178/1 "2008-02-15T03:51:13Z")

</div>

Hi,

I am getting this error on Rails 2.0.2 with MySql 5.0.27 on XP

I thought it was a problem with the old mysql ruby drivers that was  
fixed using the win32 gem.

But now it has come back when I upgraded to InstantRails 2 which has  
the above versions shipped with it.

Does anybody have any idea what the problem is?

I may have to go back to my previous setup which was working fine!

Cheers  
Giorgio

---

<div class="post-metadata">

**Author:** ![giorgio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Post date:** [February 15, 2008, 8:41am UTC](https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query/129178/2 "2008-02-15T08:41:24Z")

</div>

Hi ,  
I don’t know exactly what error you are getting  
one reason may be because of new default database with rails 2.0.2.  
Earlier the default database was Mysql but now it is Sqlite

So try using rails -d mysql railsappname  
while creating your rails project it will change your default db back  
to mysql
