ERROR 1115 (42000): Unknown character set: 'utf8mb4'

后端 未结 8 1925
暗喜
暗喜 2020-12-02 16:20

I have a MySQL dump, which I tried to restore with:

mysql -u\"username\" -p\"password\" --host=\"127.0.0.1\" mysql_db < mysql_db

However

8条回答
  •  青春惊慌失措
    2020-12-02 17:26

    maybe whole database + tables + fields should have the same charset??!

    i.e.

    CREATE TABLE `politicas` (
      `ID` int(11) NOT NULL AUTO_INCREMENT,
      `Nombre` varchar(250) CHARACTER SET utf8 NOT NULL,
      -------------------------------------^here!!!!!!!!!!!
      PRIMARY KEY (`ID`)
    ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
      -------------------------------------------------^here!!!!!!!!!
    

提交回复
热议问题