I am able to connect normal AWS RDS MySQL instance (5.7.16). But, as I have to use MySQL as document store, I have configured MySQL instance by installing mysqlx plugin, Which is required for document store.
After this, I am trying to connect MySQL document store on port 33060 on same instance but unable to connect. I am using lambda for connection which imports xdevapi (@mysql/xdevapi) package and tries to connect with MySQL RDS instance on port 33060.
But, there is no error which I can see for, therefore I am just wondering does AWS RDS has support for MySQL document store.
Code:
xdevapi.getSession({
host: process.env.HOSTNAME,
port: process.env.PORT,
dbUser: process.env.DB_USER,
dbPassword: process.env.DB_PASSWORD
}).then(function (session) {
console.log("Connected");
session.close();
return callback(null, {'responsne':'connected', statusCode: 200});
}).catch(function (err) {
console.log(err.stack);
return callback(null, {'responsne':err.stack, statusCode: 400});
});
Kindly, help me out to find this.
Pretty late answer, but hopefully it might help to clarify similar questions in the future. Since apparently RDS is running MySQL 5.7.16, it should not load the X Plugin (which enables the Document Store) by default.
Unless you are able to provide
mysqld
startup options (in this case--plugin-load=mysqlx=mysql.so
) or have client access, in which case you can follow the steps described here to enable the plugin, you are out of luck.There's also the possibility that RDS is running some kind of fork, which does not even bundle the X Plugin.
Also, the X DevAPI connector for Node.js only guarantees support for MySQL 8.0, so, although you should be able to use it with later MySQL 5.7 versions, there are a few limitations.
Since MySQL 8.0.11 is now generally available on AWS, we've been looking at the Document Store functionality via x-plugin.
Following through the sample DB (https://dev.mysql.com/doc/refman/8.0/en/mysql-shell-tutorial-javascript-download.html) it creates the schema and imports it OK, but doesn't seem to expose the db object to mysqlsh.
For example, when I run
connected to a local host instance it outputs
whereas when connected to an RDS instance I only get
Additionally, according to https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt the X Plugin isn't supported which, as I understand it, means Document Store functionality isn't supported.