tmtm / ruby-mysql

MySQL connector for Ruby. pure Ruby version.
MIT License
143 stars 34 forks source link

issue when starting the app with ruby-mysql - protocol.rb:569 #15

Closed orlando closed 13 years ago

orlando commented 13 years ago

when i start the rails server (rails server command) i got this issue http://pastie.org/2208134

MySQL ver. 5.1.54-1ubuntu4

/home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:569:in `block in read': invalid packet: sequence number mismatch(3 != 1(expected)) (Mysql::ProtocolError)
    from /home/lndx/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:565:in `read'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:287:in `get_result'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:275:in `query_command'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql.rb:332:in `query'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb:287:in `execute'

the problem fixed when i changed the root password (this a dev machine) and instead of using OLD_PASSWORD() method i use the normal PASSWORD() method.. i don't know if this has something to do with the problem, but this solved it..

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('pass'); insted of 
SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('pass');

anyway, close this issue if this is irrelevant thanks :)

tmtm commented 13 years ago

Thank you