1

我面臨OAUTH問題,當我分配數據類型JSON到Facebook和谷歌(這是默認情況下發電機)。我的數據庫是MySQL和我得到這個錯誤:yeoman fullstack發電機社會oauth問題

Server failed to start due to error: SequelizeDatabaseError: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JSON,twitterJSON,googleJSON 

如果我設置的數據類型:文本或字符串,然後它工作,但我不能查詢在MySQL即可。這個錯誤是關於mariadb,但我使用mySql奇怪!

如何在MySql中存儲JSON數據類型,因爲我不得不在查詢中發現facebook.id etc?

refrence:https://github.com/angular-fullstack/generator-angular-fullstack/issues/2510

+0

你的數據庫是MariaDB的,而不是MySQL的。他們非常相似,但不一樣。如果你能和我們分享完整的sql語句,那將會簡單得多。 – Shadow

+0

亞,但我使用mySql作爲數據庫 –

+1

不,你不是。查看錯誤消息:「檢查與您的** MariaDB **服務器版本相對應的手冊」 – Shadow

回答

1

數據類型JSON問題

的MySQL 5.7支持類型JSON。 enter image description here enter image description here

但問題是你正在使用sequelize。 sequelize是node.js的ORM sequelize不支持JSON與MySql類型只支持JSON與Postgres
也見附件。

enter image description here

最近confimed與他們的成員
check here enter image description here