How to configure MySQL document store on AWS RDS

1k views Asked by At

I am new to AWS RDS & MySQL document store.

I have created one lambda (NodeJS 4.3) & one RDS MySQL instance which is having default port 3306. I have enabled X Plugin as mentioned in this documentation via MySQL shell and its successfully installed which is needed for MySQL document store.

My lambda imports xdevapi (@mysql/xdevapi) package and tries to connect with MySQL RDS instance on port 33060 because xdevapi uses 33060 as default port.

but when I tries to test my lambda then it is unable to connect. Because, xdevapi uses default port 33060. But my MySQL default port is 3306. So, I added custom rule in security groups to allow inbound for port 33060. And then, I tried to test lambda then it still unable to connect.

Kindly, suggest if anything I am missing here.

3

There are 3 answers

1
Matt Altepeter On

It looks like the getSession method takes a port option:

xdevapi.getSession({
    host: 'localhost',
    port: 3306,
    dbUser: 'root',
    dbPassword: ''
})
0
ruiquelhas On

Sort of a duplicate of this one. Short answer is: you probably won't be able to use the MySQL Document Store on RDS. Check the linked thread for additional details.

1
Visruth On

The short answer is you can't use X Plugin in mysql RDS.

Read the section MySQL Features Not Supported By Amazon RDS in the official of AWS RDS it says that X Plugin is not supported that's why RDS doesn't provide any provision to configure port for it.

X Plugin implements a different protocol called X Protocol for the communication so it needs to be exposed in different port (other than the mysql connection port), its default port is 33060. The connection url will be something like this mysqlx://localhost:33060.

I also had to use mysql Document Store so I installed mysql 8 on EC2 and it works well with their X DevAPI.