2

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.

Shri.harry
  • 287
  • 1
  • 2
  • 15
  • 1
    If you can't see an error it means you must turn up the error reporting. – Jakub Kania Jan 22 '17 at 11:07
  • I am using .catch() to catch any errors. And I tried to give some unavailable port then I get error. But, this 33060 port I can't see anything and its not going inside if there is no problem. I will update question with my code. – Shri.harry Jan 22 '17 at 11:30
  • 1
    Why are you using port 33060 instead of port 3306? Also, is that port (3306 or 33060) open in RDS Security group? – Aniruddha J Jan 23 '17 at 07:47

2 Answers2

1

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

\use world_x  

connected to a local host instance it outputs

Default schema set to `world_x`.
Fetching table and column names from `world_x` for auto-completion... Press ^C to stop.

whereas when connected to an RDS instance I only get

Default schema set to `world_x`.

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.

0

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.

ruiquelhas
  • 1,905
  • 1
  • 17
  • 17