Connecting to a Database Cluster
You can easily connect to Arvancloud database clusters through the terminal or graphical interfaces and manage your data.
To get the database connection details, click the cluster you want to connect to in All Databases in the Cloud Database menu of the Arvancloud panel. In the Overview tab, you can see and get this information as parameters and as a connection string.
If you want to use third-party applications to connect, you can get the connection parameters. If you choose to connect through the terminal, you can use the connection string.
Connecting via the Terminal
You can connect to the database both through the terminal and command line and through applications with a graphical interface.
To connect to database clusters through mysql or psql in the terminal, you can use the following commands:
MySQL
mysql -h 'HOST' -u 'USERNAME' -p'PASSWORD'
PostgreSQL
psql -h 'HOST' -U 'USERNAME' -d 'DBNAME'
Note that you need to find the values of USERNAME, HOST, and PASSWORD for your cluster in Connection Details and replace them.
If you connect to the cluster successfully, you see the MySQL or PostgreSQL welcome message and command prompt.
From then on, you can manage your cluster with MySQL or PostgreSQL commands. To learn more, use the official MySQL or PostgreSQL documentation:
Connecting via a Graphical Interface
To connect to Arvancloud database clusters with graphical tools (GUI), you can use any software that can connect to MySQL or PostgreSQL.
MySQL
In this guide, we explain how to connect with Navicat. Navicat is a fast, reliable, and simple database management tool. With its graphical user interface, this software makes it easy to connect from your own computer to database clusters.
Download the software from the following address and then install it:
https://www.navicat.com/en/download/navicat-for-mysql
After running the software, create a new connection from File > New Connection > MySQL.
On the page that opens, enter the values as follows:
- Connection Name: Choose a name for your connection.
- Host: Copy the URL value from the cluster's Connection Details in the Arvancloud panel and paste it here.
- Port: Enter 3306 here.
- User Name: Copy this value from the cluster's Connection Details in the Arvancloud panel and paste it here.
- Password: Copy this value from the cluster's Connection Details in the Arvancloud panel and paste it here.
Then click Test Connection to check the connection. Finally, click OK to create your connection. You can see this connection in the list on the left side of the software.
From then on, you can manage your cluster in Navicat. You can also use the official Navicat documentation to learn how to work with this software.
PostgreSQL
To connect to Arvancloud Cloud Database PostgreSQL clusters with graphical tools (GUI), you can use pgAdmin or Navicat.
Connecting with Navicat
Download the software from the following address and then install it:
https://www.navicat.com/en/products/navicat-for-postgresql
After running the software, create a new connection from File > New Connection > PostgreSQL.
On the page that opens, enter the values as follows:
- Connection Name: Choose a name for your connection.
- Host: Copy the URL value from the cluster's Connection Details in the Arvancloud panel and paste it here.
- Port: Enter 5432 here.
- Initial Database: Take the database name from the cluster's Connection Details and enter it here.
- User Name: Copy this value from the cluster's Connection Details in the Arvancloud panel and paste it here.
- Password: Copy this value from the cluster's Connection Details in the Arvancloud panel and paste it here.
Then click Test Connection to check the connection. Finally, click OK to create your connection. You can see this connection in the list on the left side of the software.
From then on, you can manage your cluster in Navicat. You can also use the official Navicat documentation to learn how to work with this software.
Connecting with pgAdmin
pgAdmin is one of the most widely used and powerful PostgreSQL database management tools, letting you easily manage and monitor your database.
Download and install the software from the following address:
https://www.pgadmin.org/download/
After installing and running pgAdmin, create a new connection with Add New Server on the main page.
In the window that opens, enter the connection information as follows:
- Name: Choose a name for your connection.
Then go to the Connection tab and enter the connection details:
- Host: Copy the URL value from the cluster's Connection Details in the Arvancloud panel and paste it here.
- Port: Enter 5432 here.
- Username: Copy this value from the cluster's Connection Details in the Arvancloud panel and paste it here.
- Password: Copy this value from the cluster's Connection Details in the Arvancloud panel and paste it here.
- Database: Enter the name of the database you want.
After entering the information, click Save to create the connection. You can now see and manage your database in the list on the left.
From then on, you can manage your PostgreSQL database through pgAdmin. To learn more about this software, you can use the official pgAdmin documentation.