Boost logo

Boost :

From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2022-05-10 20:19:44


On Tue, 10 May 2022 at 18:29, Phil Endecott via Boost
<boost_at_[hidden]> wrote:
>
> Richard Hodges wrote:
> > Reviewing a database connector in depth will require setting up
> > an instance of a MySQL database.
>
> Here is how to set up a MySQL-compatible database in Amazon Web Services,
> in case it is useful to anyone:

Hi Phil,

Thank you so much for the explanation, I'm sure it will be useful.
In case you have docker available in your local machine, you can also
make use of the Docker containers used by this library's CIs.
There is a page in the docs explaining how to use them:
https://anarthal.github.io/mysql/mysql/examples/setup.html

In case anyone wants to run the integration test suite that is run by the CI,
I'd recommend using these containers, as they contain the appropriate
configuration for the tests. If you are curious, there is a guide on how to
run them in the docs, too:
https://anarthal.github.io/mysql/mysql/tests.html

Please note that integration tests are *NOT* run by default when
building the library (only unit tests are).

If you have any questions on using these containers or running
the tests, please let me know.

>
> - Go to the AWS console and log on. Yes, you need an account.
>
> - Select an appropriate region.
>
> - Select "RDS" (Relational Database Service) from Services.
>
> - Select "Create database".
>
> - You have a choice of MySQL, MariaDB, and Amazon Aurora MySQL-compatible
> edition. I'm using Aurora. Subsequent settings may depend on the variant
> chosen.
>
> - I suggest turning on "Show versions that support Serverless v2" and
> choosing the one available version, currently "Aurora MySQL 3.02.0
> (compatible with MySQL 8.0.23)". (Having said that, I don't think this
> qualifies for the free tier.)
>
> Skipping many settings where the defaults are OK and/or the choice
> is obvious...
>
> - In "Instance configuration", choose "Serverless" and set min and max
> memory sizes (I'm trying 0.5 and 2).
>
> - In "Connectivity", you can either choose "Public access - yes" in
> which case you'll be able to connect from a client outside AWS, or
> "Public access - no" and a VPC/subnet, in which case you'll be able
> to connect only from within AWS, e.g. from an EC2 instance.
>
> - Note that the "VPC security group" is essentially the firewall
> rules for the database. Choosing "create new" will open the default
> port 3306. Take care with this, it may have granted access only to
> the IP address of my web browser when I tried it just now.
>
> - I don't suggest letting it generate the password automatically, I
> don't think it told me what it was :-( You can change it later.
>
> - Click "Create database".
>
> - You should now see a simple tree of instances with a parent
> "Regional Cluster" with a single child "Writer Instance". Wait until
> both show Status Available.
>
> - Copy the "Endpoint name" for the "Writer instance".
>
> - On your client, try to connect using the endpoint name as the
> hostname:
>
> $ mysql -h xyz1234.region.rds.amazonaws.com -P 3306 -u admin
> Enter password:
> MySQL>
>
> (Beware of -p vs. -P on the command line there...)
>
>
> Now to see if I can make this library communicate with it!

Please let me know if you encounter any trouble.

>
>
> Regards, Phil.
>
>
>
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk