MySQL - Lost Connection?

111 views
Skip to first unread message

AliasX Neo

unread,
Dec 18, 2006, 4:58:05 AM12/18/06
to rubyonra...@googlegroups.com
I have no idea why I am getting this error. I have checked my database
thoroughly and have found nothing wrong with it. I'm running MySQL 5.0,
here is the exact error I am getting:

Mysql::Error: Lost connection to MySQL server during query: SELECT *
FROM composers

Does anybody know how to fix this? Thanks.

Cheers,
- Josh

--
Posted via http://www.ruby-forum.com/.

Erlend Simonsen

unread,
Dec 18, 2006, 5:50:59 AM12/18/06
to rubyonra...@googlegroups.com
AliasX Neo wrote:
> I have no idea why I am getting this error. I have checked my database
> thoroughly and have found nothing wrong with it. I'm running MySQL 5.0,
> here is the exact error I am getting:
>
> Mysql::Error: Lost connection to MySQL server during query: SELECT *
> FROM composers
>
> Does anybody know how to fix this? Thanks.
>
I had to swap my MySQL driver for that error to go away. I got that
error while using the pure ruby driver, but with libmysql-ruby1.8 from
Ubuntu/Debian it worked again.

--
Erlend Simonsen
http://www.clockingit.com

Roderick van Domburg

unread,
Dec 18, 2006, 6:24:03 AM12/18/06
to rubyonra...@googlegroups.com
Which operating system are you running on?

- Roderick

AliasX Neo

unread,
Dec 18, 2006, 12:04:56 PM12/18/06
to rubyonra...@googlegroups.com
Roderick van Domburg wrote:
> Which operating system are you running on?
>
> - Roderick

I'm running on Windows XP Pro with MySQL 5.0. Where can I find an
alternative for Windows?

mcinty...@gmail.com

unread,
Dec 18, 2006, 2:42:58 PM12/18/06
to Ruby on Rails: Talk
I was having the same problem on OS X. Pretty sure this is what fixed
it:

sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql

I think that's the lower level mysql interface. Sorry I seem so
unsure, just running off the top of my head.

Tim

Conrad Taylor

unread,
Dec 18, 2006, 3:00:48 PM12/18/06
to rubyonra...@googlegroups.com
Hi Tim, this is actually a necessary step on Mac OS X due to the performance gains that one can receive.  At this time, the command is as follows for both Mac OS X and Windows:

sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

-Conrad

Jason Garber

unread,
Dec 19, 2006, 8:23:57 AM12/19/06
to Ruby on Rails: Talk
We also had this error occasionally on Windows with Rails 1.2RC1 (the
tag) before [5637]. If you're running against the RC1 tag, switch to
the 1.2 prerelease branch.

I doubt this applies to you, Josh, but there it is just in case.

Jason Garber

Roderick van Domburg

unread,
Dec 19, 2006, 10:35:16 AM12/19/06
to rubyonra...@googlegroups.com
AliasX Neo wrote:
>> Which operating system are you running on?
>
> I'm running on Windows XP Pro with MySQL 5.0. Where can I find an
> alternative for Windows?

And which MySQL/Ruby adapter are you using? You could try the one I'm
offering at http://www.vandomburg.net/pages/mysql-ruby-windows. Let me
know if that resolves your issues.

- Roderick

Reply all
Reply to author
Forward
0 new messages