24 Oct
matte

matte il 24 October 2005 parla di Configurazioni

Problema di connessione a MySQL 4.1 o superiore

Se connettendovi al Database MySQL ottenete i seguenti errori:

    1 'Packets out of order' error was received from the database. Please update your mysql bindings (gem update mysql) and read http://dev.mysql.com...

oppure

    1 ActiveRecord::StatementInvalid in  Controller#method  Lost connection to MySQL server during query: SHOW FIELDS FROM table

Dovete commentare (inserendo il carattere “#”) la riga di codice:

    1 require 'active_record/vendor/mysql411'

all’interno del file mysql_adapter.rb, che si trova sotto Windows in:

    1 {RUBYPATH}\lib\ruby\gems\1.8\gems\activerecord-1.11.1\lib\active_record\connection_adapters

mentre sotto Debian, se avete installato il pacchetto rails con apt-get in:

    1 /usr/share/rails/activerecord/lib/active_record/connection_adapters

se avete installato il Rails tramite il RubyGem in:

    1 /usr/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/connection_adapters

Una volta modificato il file, riavviate il Server Web per rendere effettive le modifiche.

4 Commenti a “Problema di connessione a MySQL 4.1 o superiore”

  1. CD il 9 November 2005 alle 07:42 dice:

    I don’t know any italian, but your site was the only site I could find for fixing my problem.

    I have been fighting with mysql connection issue for days, and resolved the issue with your help…

    And, I have to tell you: THANKS A LOT!

  2. matte il 9 November 2005 alle 18:36 dice:

    You’re welcome and many thanks for your compliments.

    I’m happy that this article helps you and I hope that will help someone else!!!

    Bye

    Matte

  3. ixnaum il 20 November 2005 alle 00:07 dice:

    Thanks matte … it helped me too!

  4. matte il 20 November 2005 alle 21:02 dice:

    You’re welcome ixnaum

Scrivi un commento