Getting Started with PGAdmin on a Distributed SQL Database
If you’re a database developer, you already understand the importance of a tool to manage your databases. Whether it is for creating schemas, ad-hoc querying, backups, or diving deeper to troubleshoot a database issue, a database tool can make your life much easier and increase your productivity. In a previous post we covered how to get started with DBeaver, and in this post we’ll show you how to get up and running with YugaByte DB and PGAdmin.
What is PgAdmin?
PgAdmin is a commonly used database management tool in the PostgresDB community. It simplifies the creation, maintenance, and use of database objects by offering a clean and intuitive user interface. PgAdmin is packed with a rich set of features to manage databases including a simple to use connection wizard, built-in SQL editor to import SQL scripts, and a mechanism to auto-generate SQL scripts if you need to run them on the database command line shell. The GUI is very clean and you can get accustomed to it in no time. You can run PgAdmin through the web interface, or as a downloadable app that is locally installed. To learn more about how it works, you can check out their FAQ.
Before we get into PGAdmin, you’ll need to set up YugaByte DB and install a sample database. For the purposes of this blog post we’ll be using the Northwind sample database. The instructions for how to get up and running in just a few minutes can be found in our previous blog post, “The Northwind PostgreSQL Sample Database Running on a Distributed SQL Database.”
In this how-to we’ll be focused on getting up and running on a Mac, although PGAdmin supports all the popular operating environments.
To get the latest version, check out the PGAdmin download page. Once you have downloaded, installed and opened up the PGAdmin application, you’ll need to set a master password for the application. Next, you are ready to click on the “Add New Server” icon as shown below:
In YugaByte DB, by default the hostname and port number are localhost and 5433 respectively.
Note: By default in the configuration screen, port 5432 is used, and this should be changed to 5433. Just like a regular PostgreSQL cluster, password authentication for the postgres user is disabled, and hence no password should be specified to get started.
Save the server connection object and after refreshing the left menu in PgAdmin, you should be able to see the servers, and the objects in the server.
Working with the Northwind Sample Database
That’s it! You are ready to start exploring the northwind database running on a distributed SQL backend using PGAdmin. Let’s take a quick tour.
View Database Objects
By expanding out northwind > schemas > public > tables you can quickly visualize all the tables in the northwind database, retrieve their properties, view monitoring stats and any dependencies.
You can quickly view and edit the data in a table by right-clicking on the table and selecting view/edit data.
Or, if you want to try your hand at writing your own SQL queries, you can do that by clicking on the “lightning bolt” or query editor button. In this UI you can create, run and view the results of your query.
There’s a ton more development and administrative capabilities inside of PGAdmin. Make sure to check out the PGAdmin docs to dig into how all their various features work.
- Using YugaByte at your company? Tell us about it and we’ll send you a hoodie!
- Compare YugaByte DB in depth to databases like CockroachDB, Google Cloud Spanner and MongoDB.
- Get started with YugaByte DB on macOS, Linux, Docker, and Kubernetes.
- Contact us to learn more about licensing, pricing or to schedule a technical overview.