# Solaris migration error:Lost connection to MySQL server

**URL:** <https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041>\
**Category:** Rails\
**Created:** [May 9, 2006, 6:34pm UTC](https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041 "2006-05-09T18:34:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmcclean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Post date:** [May 9, 2006, 6:34pm UTC](https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041/1 "2006-05-09T18:34:26Z")

</div>

We have installed rails 1.1.2 and Ruby 1.8.4 on solaris. When we attempt  
to  
run the initial migration we get the following error:

Mysql::Error: Lost connection to MySQL server during query: SELECT  
version FROM schema\_info  
/web/server/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active\_record/connection\_adapters/abstract\_adapter.rb:120:in  
`log' /web/server/pkgs/ruby-1.8.4/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:185:in`execute’  
/w

.etc

I can run my Windows installtion of Rails and connect to the MySql db,  
no problem.

Can anyone indicate what the problem might be?

Thanks in advance,  
Don Mc

---

<div class="post-metadata">

**Author:** ![dmcclean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Post date:** [May 9, 2006, 8:08pm UTC](https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041/2 "2006-05-09T20:08:25Z")

</div>

Which version of the MySQL bindings are you using? Rails comes bundled  
with the default Ruby MySQL bindings rather than the native ones.

I’ve found upgrading to the native ones (you really should anyone for  
performance reasons) on solaris solved strange problems like this.

Alternatively move to Postgresql if you can as I’ve found it to be less  
problematic.

Cheers

## Jonathan

http:/www.agileevolved.com

---

<div class="post-metadata">

**Author:** ![dmcclean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Post date:** [May 9, 2006, 8:14pm UTC](https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041/3 "2006-05-09T20:14:09Z")

</div>

Jonathan,  
Thanks. Do you know where I could obtain the native bindings?

Regards,  
Don Mc

Jonathan Conway wrote:

> Which version of the MySQL bindings are you using? Rails comes bundled  
> with the default Ruby MySQL bindings rather than the native ones.
> 
> I’ve found upgrading to the native ones (you really should anyone for  
> performance reasons) on solaris solved strange problems like this.
> 
> Alternatively move to Postgresql if you can as I’ve found it to be less  
> problematic.
> 
> Cheers
> 
> ## Jonathan
> 
> http:/www.agileevolved.com

---

<div class="post-metadata">

**Author:** ![dmcclean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Post date:** [January 13, 2007, 6:18pm UTC](https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041/4 "2007-01-13T18:18:56Z")

</div>

Don Mc wrote:

> We have installed rails 1.1.2 and Ruby 1.8.4 on solaris. When we attempt  
> to  
> run the initial migration we get the following error:
> 
> Mysql::Error: Lost connection to MySQL server during query: SELECT  
> version FROM schema\_info

.  
.  
.

> Can anyone indicate what the problem might be?  
> Thanks in advance,  
> Don Mc

Your user in MySQL don’t have privileges to read de database  
“schema\_info”.

---

<div class="post-metadata">

**Author:** ![dmcclean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Post date:** [May 9, 2006, 11:30pm UTC](https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041/5 "2006-05-09T23:30:51Z")

</div>

Doing a “gem install mysql” should do it, you may need to use the  
–include parameter though depending on how you installed MySQL (via  
Blastwave, source or the Sun freeware packages) as I can’t remember off  
the top of my head where each of these methods install MySQL.

Cheers

## Jonathan

> **[AgileEvolved.com is for sale | HugeDomains](https://www.hugedomains.com/domain_profile.cfm?d=agileevolved.com)**
>
> Own this domain today. We make your shopping experience easy. Friendly and quick customer service.

---

<div class="post-metadata">

**Author:** ![dmcclean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Post date:** [January 31, 2007, 3:39pm UTC](https://www.ruby-forum.com/t/solaris-migration-error-lost-connection-to-mysql-server/60041/6 "2007-01-31T15:39:21Z")

</div>

I had the same problem.  
It is definitely the SQL adapter version, as Jonathan mentioned above.  
I ran “gem install mysql” , and it solved my problem.

Chau Hong Linh.
