Defect #5693

Mysql::ProtocolError: invalid packet: sequence number mismatch(3 != 1(expected)): SET NAMES 'utf8'

Added by Goran Angelkovski about 9 years ago. Updated about 9 years ago.

Status:ClosedStart date:2010-06-15
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:Invalid Affected version:0.9.4

Description

When I use RAILS_ENV=production rake db:migrate
I get the following error.

Mysql::ProtocolError: invalid packet: sequence number mismatch(3 != 1(expected)): SET NAMES 'utf8'

Can you please explain what this happens.

Thanks in advance,
Goran A.

History

#1 Updated by Felix Schäfer about 9 years ago

  • Category deleted (Database)
  • Assignee deleted (Jean-Philippe Lang)
  • Priority changed from Urgent to Normal
  1. While you might consider this as urgent, we don't. If you feel it's urgent because of some business process depending on it, I'd advise to get a consultant.
  2. Don't assign tickets to people willy-nilly, we'll take care to assign it to the most suitable person.
  3. This tracker is for bugs and feature requests for redmine, problems with your installation and your setup are to be discussed in the forums. Be sure to include what type of installation your are trying to do (what OS, did you get redmine from source or from a package, …) and tell us more about your environment (versions of ruby? rails? gem? rack? MySQL?).

#2 Updated by Felix Schäfer about 9 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

#3 Updated by Daniel Stoinski about 9 years ago

Most probably you have the ruby version of the mysql driver installed, the so called ruby-mysql from TOMITA Masahiro. In my case it was the version 2.9.3 of this driver.

Please uninstall it, if possible using gem uninstall. I had to manually remove the files

/usr/lib/ruby/site_ruby/1.8/mysql.rb
/usr/lib/ruby/site_ruby/1.8/mysql

because I installed the package over ruby setup.rb rather than over gem.

Please install the binary version of the mysql driver mysql-ruby (so, not ruby-mysql!). For this you'll have to have a C-compiler installation and the mysql client library.

Good luck!
Daniel Stoinski

Also available in: Atom PDF