mysql - yeoman 全栈生成器社交 Oauth 问题

标签 mysql mariadb google-authentication facebook-authentication yeoman-generator

当我将数据类型 JSON 分配给 facebook 和 google(默认情况下在生成器中)时,我遇到了 OAUTH 问题。我的数据库是 mysql 并且出现此错误:

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 等?

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

最佳答案

数据类型 JSON 问题

MySql 5.7 支持 JSON 类型。 enter image description here enter image description here

但问题是您正在使用 sequelize。 sequelize 是 node.js 的 ORM sequelize 在 MySql 中不支持 JSON 类型,在 Postgres 中只支持 JSON
另见附件。

enter image description here

最近与他们的成员确认
check here enter image description here

关于mysql - yeoman 全栈生成器社交 Oauth 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42574717/

相关文章:

mysql - 我应该选择什么数据类型?

php - SQL 查询产生 SQL 异常,但在 DBMS 中运行它却没有错误?

php - 如何从 html 表单发布到 Facebook 页面

mysql - MariaDB 字段的有趣问题

node.js - 相同的 Google Cloud Storage 上传脚本可以在一台 PC 上运行,但在另一台 PC 上则不行,为什么?

MySQL - 列名已命名为 'TimeStamp' ,需要在 Where 子句中使用它

mysql - 我正在尝试将 MySQL 5.5 安装到 CentOS 6.7 服务器上

mysql - 将逗号分隔的字符串迁移到 json 数组

amazon-web-services - Amazon cognito 不提供联合身份提供者提供的刷新 token (谷歌登录)

ionic-framework - keystore 文件不存在。无法获取 SHA1 key