mysql support #1471
javierpineros
started this conversation in
General
mysql support
#1471
Replies: 1 comment 1 reply
-
@javierpineros We use TypeORM to support relational databases. It would help if you changed the configuration to MySQL, remove exists migrations files in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is there support for mysql?
I tried to set DATABASE_TYPE=mysql but when I ran npm run migration:run result the next error
Error during migration run:
QueryFailedError: ER_PARSE_ERROR: 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 '"status" ("id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "' at line 1
at Query. (C:\Development\node-projects\contest-api\node_modules\typeorm\src\driver\mysql\MysqlQueryRunner.ts:246:33)
at Query. (C:\Development\node-projects\contest-api\node_modules\mysql\lib\Connection.js:526:10)
at Query._callback (C:\Development\node-projects\contest-api\node_modules\mysql\lib\Connection.js:488:16)
at Query.Sequence.end (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\sequences\Sequence.js:83:24)
at Query.ErrorPacket (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\sequences\Query.js:92:8)
at Protocol._parsePacket (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket. (C:\Development\node-projects\contest-api\node_modules\mysql\lib\Connection.js:88:28) {
query: 'CREATE TABLE "status" ("id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "PK_e12743a7086ec826733f54e1d95" PRIMARY KEY ("id"))',
parameters: undefined,
driverError: Error: ER_PARSE_ERROR: 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 '"status" ("id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "' at line 1
at Query.Sequence._packetToError (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
at Query.ErrorPacket (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\sequences\Query.js:79:18)
at Protocol._parsePacket (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket. (C:\Development\node-projects\contest-api\node_modules\mysql\lib\Connection.js:88:28)
at Socket. (C:\Development\node-projects\contest-api\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (node:events:517:28)
at Socket.emit (node:domain:489:12)
--------------------
at Protocol._enqueue (C:\Development\node-projects\contest-api\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at PoolConnection.query (C:\Development\node-projects\contest-api\node_modules\mysql\lib\Connection.js:198:25)
at C:\Development\node-projects\contest-api\node_modules\typeorm\src\driver\mysql\MysqlQueryRunner.ts:207:36
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlMessage:
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 '"status" ("id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "' at line 1
,sqlState: '42000',
index: 0,
sql: 'CREATE TABLE "status" ("id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "PK_e12743a7086ec826733f54e1d95" PRIMARY KEY ("id"))'
},
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlMessage:
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 '"status" ("id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "' at line 1
,sqlState: '42000',
index: 0,
sql: 'CREATE TABLE "status" ("id" integer NOT NULL, "name" character varying NOT NULL, CONSTRAINT "PK_e12743a7086ec826733f54e1d95" PRIMARY KEY ("id"))'
}
Beta Was this translation helpful? Give feedback.
All reactions