momy
momy copied to clipboard
ER_PARSE_ERROR
Hello trying to make mongo keep my mysql up to date but getting bad sql error
root@e69c090f6462:/# momy --config momyfile.json --import
25 Apr 10:04:27 - Connect to MySQL...
25 Apr 10:04:28 - { Error: 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 ')' at line 1
at Query.Sequence._packetToError (/usr/lib/node_modules/momy/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14) at Query.ErrorPacket (/usr/lib/node_modules/momy/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)
at Protocol._parsePacket (/usr/lib/node_modules/momy/node_modules/mysql/lib/protocol/Protocol.js:279:23)
at Parser.write (/usr/lib/node_modules/momy/node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (/usr/lib/node_modules/momy/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket.<anonymous> (/usr/lib/node_modules/momy/node_modules/mysql/lib/Connection.js:103:28)
at Socket.emit (events.js:180:13)
at addChunk (_stream_readable.js:274:12)
at readableAddChunk (_stream_readable.js:261:11)
at Socket.Readable.push (_stream_readable.js:218:10)
--------------------
at Protocol._enqueue (/usr/lib/node_modules/momy/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Connection.query (/usr/lib/node_modules/momy/node_modules/mysql/lib/Connection.js:208:25)
at Promise (/usr/lib/node_modules/momy/lib/mysql.js:177:10)
at new Promise (<anonymous>)
at MySQL.query (/usr/lib/node_modules/momy/lib/mysql.js:175:12)
at query.then.then (/usr/lib/node_modules/momy/lib/mysql.js:116:24)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
code: 'ER_PARSE_ERROR',
errno: 1064,
sqlMessage: '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 \')\' at line 1',
sqlState: '42000',
index: 1,
sql: 'DROP TABLE IF EXISTS `t_paste`; CREATE TABLE `t_paste` ();' }
25 Apr 10:04:28 - Bye
root@e69c090f6462:/#
Here my config file
{
"src": "mongodb://localhost:27017/paste_db",
"dist": "mysql://root:removed@localhost:3306/mongod",
"prefix": "t_",
"case": "camel",
"collections": {
"paste": {
"_id": "_id",
"TEXT": "db_keywords",
"TEXT": "emails",
"TEXT": "hashes",
"TEXT": "num_emals",
"TEXT": "num_hashes",
"VARCHAR": "url"
}
}
}
Password been removed to mysql being used and is allowing out of network connections