Navigate failed to import sql file

1. Create the library
2. Open the library
3. Run the sql file
4. Report an error after running the sql file
Insert image description here
5. Copy the information log and check the specific cause of the error. It is found that it is a problem with the character set setting.

[SQL] Query sf start
[ERR] 1273 - Unknown collation: 'utf8mb4_0900_ai_ci'
[ERR] /*
 Navicat Premium Data Transfer

 Source Server         : local
 Source Server Type    : MySQL
 Source Server Version : 80023
 Source Host           : localhost:3306
 Source Schema         : qlsj

 Target Server Type    : MySQL
 Target Server Version : 80023
 File Encoding         : 65001

 Date: 02/03/2023 14:41:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for tb_annual_report
-- ----------------------------
DROP TABLE IF EXISTS `tb_XXX_report`;
CREATE TABLE `tb_annual_report`  (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `tOTEQU` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所有者权益合计',
…………
-- 
[SQL] Finished with error

6. Close the database and edit the database, modify the character set, and rerun sql.

Insert image description here

Guess you like

Origin blog.csdn.net/budaoweng0609/article/details/129448050