Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何导入表文件 #9

Open
xzh1024 opened this issue Jun 11, 2019 · 4 comments
Open

如何导入表文件 #9

xzh1024 opened this issue Jun 11, 2019 · 4 comments

Comments

@xzh1024
Copy link

xzh1024 commented Jun 11, 2019

因为作者排序规则用的utf8mb4_0900_ai_ci,很多新版本找不到这个选项,所以我们用Notepad++打开trip.sql文件(不一定用np++),然后ctrl+F搜索 utf8mb4_0900_ai_ci 全部替换成 utf8mb4_general_ci
然后保存文件。

新建库
数据库名: trip
字符集: utf8mb4 -- UTF-8 Unicode
排序规则: utf8mb4_general_ci

然后就可以导入trip.sql这个表了

@webwhy
Copy link

webwhy commented Jun 11, 2019

导入成功了,怎么启动node服务呢

@tanjwGit
Copy link

新建库同时设置字符集和排序规则:
CREATE DATABASE trip DEFAULT CHARACTER SET utf8mb4 -- UTF-8 Unicode COLLATE utf8mb4_general_ci
导入trip.sql表:(路径名不能出现中文)
use trip;
source 路径名;

@zjp693
Copy link

zjp693 commented Oct 13, 2021

我是直接导入sql文件,但是报错了,大佬可以看看一下吗

Snipaste_2021-10-13_11-04-20
然后他就报错了,

image

@zjp693
Copy link

zjp693 commented Oct 13, 2021

我是直接导入sql文件,但是报错了,大佬可以看看吗

Snipaste_2021-10-13_11-04-20 然后他就报错了,

图片

解决了先创建数据库输入:CREATE DATABASE trip DEFAULT CHARACTER SET utf8mb4 -- UTF-8 Unicode COLLATE utf8mb4_general_ci
然后再导入文件就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants