0

I am getting the following error when trying to run rake db:migrate with the mysql2 gem:

ActiveRecord::StatementInvalid: Mysql2::Error: Native table 'performance_schema'.'session_variables' has the wrong structure: SHOW VARIABLES LIKE 'character_set_database'

I have tried sudo mysql_upgrade -u root -p, which upgraded mysql2 to 0.4.2, but did not solve the problem

Mike
  • 1,080
  • 1
  • 9
  • 25

1 Answers1

1

Try to add --force:

mysql_upgrade -u root -p --force

and restart your mysql2 gem.

This might help you.

Community
  • 1
  • 1
aldrien.h
  • 3,437
  • 2
  • 30
  • 52