[mysql][rails]Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
mysql5.1が動いていた環境をmysql5.6にアップデートした後、rake db:createで utf8mb4のDBを作成しようとしたところ以下のエラーが発生
./bin/rake db:create
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8mb4", "charset"=>"utf8mb4", "collation"=>"utf8mb4_general_ci", "pool"=>5, "username"=>"sample", "password"=>"*****", "database"=>"sample_development"}, {:charset=>"utf8mb4", :collation=>"utf8mb4_general_ci"}
(If you set the charset manually, make sure you have a matching collation)
rubyのバージョンも2.0だったので2.1にアップデートして再度bundle installからやり直してみたところ、うまく動いた。
備忘録としてメモ。