Creating Resources#
A resource can either be serverless resource or a dedicated service resource.
Serverless resources include secure serverless databases while dedicated service resources include dedicated instances of each resource.
Create a Database Resource#
To create a database resource,
-
If you haven't yet, Create an Account and login with your new account.
-
In the console, displayed below, click New Resource and follow the instructions.
-
Enter the name and description of your database resource.
-
Select the database kind from the Resource Kind dropdown.
-
Finally, select the location for your resource then click Create.
-
You should see connection details.
Warning
Please note that the password will be displayed just the once and never again. So please take of it and store it in a safe place.
Create a Services Resource#
To create a service resource,
-
If you haven't yet, Create an Account and login with your new account.
-
In the console, displayed below, click New Resource and follow the instructions.
-
Enter the name of your service and select the service kind from the Resource Kind dropdown and enter the number of
Nodes
, theCPU
per node,Memory
per node andStorage
per node -
Finally select the location of the resource and then click Create
-
You should see connection details.
Warning
Please note that the password will be displayed just the once and never again. So please take of it and store it in a safe place.
Connect to your Resource#
Using the connection details above, you can connect to your database.
Test Non Secure Connection#
Lets first test that our connection will always be secure. Attempt to connect with ssl mode disabled.
$ mysql -h mysql80-afe9.euw2.cloud.ametnes.com -P 3306 -u HeCO05IxBY -D 7974790334 -p --ssl-mode=disabled
Enter password:
ERROR 1045 (28000): Access denied for user 'HeCO05IxBY'@'10.1.2.27' (using password: YES)
You should see an Access Denied error
Error message
ERROR 1045 (28000): Access denied for user 'HeCO05IxBY'@'x.x.x.x' (using password: YES)
Test Secure Connection#
All connections to our services are secure by TLS. So start by verifying that your connection is secure.
Secure MySql and MariaDB Connections#
Now login with a secure connection.
$ mysql -h mysql80-afe9.euw2.cloud.ametnes.com -P 3306 -u HeCO05IxBY -D 7974790334 -p
Enter password:
Your MySQL connection id is 1513767
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Finally make sure your connection is secure with.
mysql> SHOW SESSION STATUS LIKE 'Ssl_cipher';
+---------------+-----------------------------+
| Variable_name | Value |
+---------------+-----------------------------+
| Ssl_cipher | ECDHE-RSA-AES128-GCM-SHA256 |
+---------------+-----------------------------+
1 row in set (0.01 sec)
Further Reading
For detailed information on secure MySql connections, please see MySql 5.7 and MySql 8.0
Secure Postgres Connections#
To ensure that your connection is secure, connect to your resource and you should see the
line SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
as shown
below.