AWS Lightsail - Accessing a mysql database in a different account?


I have 2 accounts (root user) set up. They are in the same region.

One account (call it 'Account A') has a mysql database instance with multiple database schemas.

The other account (call it 'Account B') has the webserver (we have an external developer building the web site which accesses the database schema).

I have tried doing a simple mysql connection (using the mysql client on the ubuntu server) try and access Account A's database. However, I get an 'access denied'. I have a feeling it may be because the database isn't open to the public. Is there anyway to do this securely?

Has anybody done this successfully?

Many Thanks for any help!

asked 3 years ago327 views
2 Answers

You would have to open the public ports for mysql.

Each account has it's own VPC. All instances in that VPC can access each other using the VPC, but no other instances.

I blogged about it here:


profile picture
David G
answered 3 years ago

Thank you for the detail.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions