When the infrastructure stack is constantly changing, or on the contrary, it is already established but large, you have to work with a lot of different software. One of the main problems with this infrastructure management scheme is administration. When it is necessary to perform one and the same routine task, for example, for databases in different languages, you need a person who can write a suitable script for each of them.
As well as his time for manual data entry, such a problem is solved by a universal client Dbeaver. Let's see how to work with it and its configuration in this material!
What is Dbeaver and how do I download it?
Dbeaver, as mentioned above is a universal client for various databases with a GUI interface. It is based on converting the user's actions in the application into the language of calls to the database he has chosen.
This task is achieved with the help of connectors, which are third-party software that allow you to link the API of the application and the selected database server! To download this software on Windows, let's use the winget utility via Terminal. To do this, press Win+X → Terminal/PowerShell (Administrator) and type the command:
If there is a problem with this method, then use the classic download, through the official website of the developer. After making sure that the database server is configured and a user with the appropriate rights to work is allocated:
Next, let's open Dbeaver, where among the many functions and tabs, right-click the field where the localhost configuration is already located:
Select Create and Connection, which will allow us to choose a further connector to work with our database. After that we will configure the connection in detail, in the Server field specifying the URL/Host, as well as the user for the database with its password. It will be important to decrypt the URL string:
- jbdc is the name of the connector system that will be called to process our query;
- mysql is the name of the database that will be used;
- localhost is the address of the connection, in this case to your own machine, but you can specify the address of a server available to you on the network;
- And after the last / you can specify the database to work with.
If you do not have on the basis of network access delimitation the possibility to use the port for the database, then in the top tab of SSH you can select a tunnel that will broadcast your connection. But only on the allowed port, if you configure it, don't forget to change the server address in Main to Localhost, as you will already send the required traffic to the machine.
Create a database, we will use the MySQL language:
And then specify the name of your newly created database in the line for connection, not forgetting to change the port to the right one!
PostgreSQL - Port: 5432;
MySQL - Port: 3306;
MariaDB - Port: 3306;
Microsoft SQL Server (MSSQL) - Port: 1433;
Oracle Database - Port: 1521;
IBM Db2 - Port: 50000;
MongoDB - Port: 27017;
Redis - Port: 6379;
Cassandra - Port: 9042.
The connection should then open and your server should be able to respond to the request, however, if it doesn't, manually check the user and their ability to connect from the remote host. For MySQL use the command:
And to execute the PostrgeSQL command, use the following syntax, first replacing username:
FROM pg_user
WHERE usename = 'username';
Great, everything is fine now let's go to the database and right-click on it → Create New Table:
After that you can make changes, click the ‘Save’ button (floppy) to apply them:
After confirming that you want to execute these commands on your server and click Execute. For further work with Dbeaver, you can use the functional tabs on the control panel, you can learn more about them with our step-by-step guide!
As a result of executing these commands you should get a list of parameters of the requested objects. If you don't have sufficient resources than you can perform actions on powerful cloud servers. Serverspace provides isolated VPS / VDS servers for common and virtualize usage.