I have my MongoDB instance set up to use Authentication. I have my Mongo Connect BI setup to use the same authentication, but when I pass these authentication details through Cube.js I get the following error.
Error: ssl is required when using cleartext authentication at Packet.asError (/Users/Anton/Documents/Development/node/react-dashboard/node_modules/mysql2/lib/packets/packet.js:708:17) at ClientHandshake.execute (/Users/Anton/Documents/Development/node/react-dashboard/node_modules/mysql2/lib/commands/command.js:28:26) at Connection.handlePacket (/Users/Anton/Documents/Development/node/react-dashboard/node_modules/mysql2/lib/connection.js:408:32) at PacketParser.Connection.packetParser.p [as onPacket] (/Users/Anton/Documents/Development/node/react-dashboard/node_modules/mysql2/lib/connection.js:70:12) at PacketParser.executeStart (/Users/Anton/Documents/Development/node/react-dashboard/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket.Connection.stream.on.data (/Users/Anton/Documents/Development/node/react-dashboard/node_modules/mysql2/lib/connection.js:77:25) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11)
My mongosqld command is as follows
mongosqld --mongo-uri "mongodb://XX.mlab.com:XX" -u DBUN -p DBPW --mongo-authenticationSource DBNAME --sampleNamespaces DBNAME.*
My Cube.js .ENV configuration is as follows
CUBEJS_DB_HOST=localhost CUBEJS_DB_NAME=DBNAME CUBEJS_DB_PORT=3307 CUBEJS_DB_TYPE=mongobi CUBEJS_DB_USER=DBUN CUBEJS_DB_PASS=DBPW
Any help would be greatly appreciated.
Thanks
Anton