How to connect to a Database Instance
You may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
- You have an account and are logged into the Scaleway console
- You have a PostgreSQL or MySQL Database Instance
-
Click PostgreSQL and MySQL under Managed Databases on the side menu. A list of your Database Instances displays.
-
Click the database name or «See more Icon» > More info to access the Database Instance information page.
-
Retrieve the Database Instance IP and port from the Database Instance information section.
Note:Alternatively, you can click the copy icon under Connection to retrieve the database client connection command. This already includes your database IP and port.
-
Connect to your database with the database client of your engine.
For MySQL, run the following command:
mysql -h <ip-address> --port <port> -p -u <user_name>For PostgreSQL, run:
psql -h <ip-address> -p <port> -U <username> -d rdb -
Enter the password that you defined upon Database Instance creation.
You are now connected to your Managed Database.