Summary of errors reported when mysql imports backup .sql files (still to be improved)

错误1:ERROR Unknown character set: 'utf8mb4'

  The utf8mb4 encoding set supports emoji, and I believe everyone who has dealt with social network data knows it. This mysql5.5 supports the utf8mb4 encoding set, so you can only uninstall 5.1 and upgrade 5.5

  Set default-character-set = utf8mb4 in mysql my.cnf, set utf8mb4 in each [], or not set it here, it is more convenient and efficient to set when building a database or data table

[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'

 

Error 2:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE,
  KEY `authorid` (`authorid`) USING BTREE,
  KEY `dateline` (`datel' at line 24

  After searching, it is the problem of mysql version, the imported library is server version: 5.0.18, and the exported library is 5.1.45. Open the exported mysql file and find something similar to

KEY `authorid` (`authorid`) USING BTREE

  changed to

KEY `authorid`USING BTREE(`authorid`)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325993322&siteId=291194637