Mysql::Error: Data too long for column ‘name’ at row 1: INSERT INTO `categories`
的なエラーが出てきたので、

Error Code:

1406. Data too long for column – MySQL
ターミナルからmysqlに以下のコードを実行

SET @@global.sql_mode= '';

そしたら、次は

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT

unicodeに関するエラーが出てきたので、

utf8_genneral_ci

に全てを変更して無事解決できました

参考にした記事

Forums » Data too long for column ‘title’ at row 1
ちゃんと文字コードはあわせましょうbyRails+MySQL
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) within stored procedure

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

CAPTCHA