Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

那个sql文件有个疑问 #5

Closed
buzai opened this issue May 24, 2017 · 6 comments
Closed

那个sql文件有个疑问 #5

buzai opened this issue May 24, 2017 · 6 comments

Comments

@buzai
Copy link

buzai commented May 24, 2017

utf8mb4 COLLATE = utf8mb4_unicode_ci
这个地方就报错了,是需要我数据库设置成mb4编码吗?

@buzai
Copy link
Author

buzai commented May 24, 2017

Batch file: /Users/chen/Documents/study/zhihuspider/setup.sql
(2017-05-25 01:02:50) execution started
(2017-05-25 01:02:51) execution finished
went through 22 queries
3 errors encountered
Error at query 7: 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 '= utf8mb4_unicode_ci NOT NULL,
content mediumtext CHARACTER SET utf8mb4 COLL' at line 21
Error at query 14: Table 'zhihu.usertopanswers' doesn't exist
Error at query 20: Table 'zhihu.usertopanswers' doesn't exist

@atonasting
Copy link
Owner

版本问题,你的mysql可能不支持mb4

@buzai
Copy link
Author

buzai commented May 24, 2017

我的是 :
mysql Ver 14.14 Distrib 5.5.54, for debian-linux-gnu (armv7l) using readline 6.3
这个不行吗

@atonasting
Copy link
Owner

按说5.5.3以上就支持了,也有可能是数据库本身配置问题。你可以手工建立一个测试表试试看,如果行的话,再手工建立answers表。我用的应该是5.7

@buzai
Copy link
Author

buzai commented May 24, 2017

数据库我手动把那2字段删了执行完自己加上去了又,现在发现知乎的cookie没有login字段了只有前面那个东西

@atonasting
Copy link
Owner

是的,知乎现在的样式已经和我发布爬虫时完全不同了,爬虫已经失效。我写个公告去吧。

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

No branches or pull requests

2 participants