MySQL - Lost Connection?

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

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 S.

Which operating system are you running on?

  • Roderick

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?

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

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 G.

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

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