-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgadmin-windows.html
More file actions
128 lines (127 loc) · 15 KB
/
pgadmin-windows.html
File metadata and controls
128 lines (127 loc) · 15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>pgAdmin 4 on Windows — Setup, Connect and Query Guide</title>
<meta name="description" content="How to set up and use pgAdmin 4 on Windows 10 and 11. Launch, set master password, connect to PostgreSQL, run SQL queries and fix common pgAdmin issues.">
<link rel="canonical" href="https://postgre-sql.github.io/pgadmin-windows.html">
<meta name="last-modified" content="2026-06-08">
<meta property="og:title" content="pgAdmin 4 on Windows — Setup, Connect and Query Guide">
<meta property="og:description" content="How to set up and use pgAdmin 4 on Windows 10 and 11. Launch, set master password, connect to PostgreSQL, run SQL queries and fix common pgAdmin issues.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://postgre-sql.github.io/pgadmin-windows.html">
<meta property="og:image" content="https://postgre-sql.github.io/og-image.svg">
<meta name="twitter:card" content="summary_large_image">
<link rel="icon" href="/favicon.svg">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<nav class="site-nav"><div class="wrap"><div class="nav-inner">
<a href="/index.html" class="nav-logo"><div class="nav-logo-mark">Pg</div><span class="nav-logo-name">PostgreSQL</span><span class="nav-logo-sub">for Windows</span></a>
<div class="nav-links">
<a href="/index.html" id="nl-home">Home</a>
<a href="/download-windows.html" id="nl-dl">Download</a>
<a href="/offline-installer.html" id="nl-off">Offline</a>
<a href="/configure-windows-service.html" id="nl-svc">Service</a>
<a href="/fix-path-issues.html" id="nl-path">PATH fix</a>
<a href="/pgadmin-windows.html" id="nl-pgadmin">pgAdmin</a>
<a href="/postgresql-windows-faq.html" id="nl-faq">FAQ</a>
</div>
<a href="/download-windows.html" class="nav-cta"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg> Download</a>
</div></div></nav>
<div class="page-hero"><div class="wrap">
<nav class="breadcrumb"><a href="/index.html">home</a> <span>/</span> <span>pgadmin-windows</span></nav>
<span class="page-tag">pgAdmin guide</span>
<h1>pgAdmin 4 on Windows — <span>setup, connect & query guide</span></h1>
<p class="page-lead">pgAdmin 4 is the official PostgreSQL GUI, bundled with the Windows installer. This guide covers launching pgAdmin, setting a master password, connecting to your server and running SQL queries.</p>
</div></div>
<div class="wrap"><div class="content-layout">
<main><div class="section" aria-labelledby="what-h2"><span class="section-label">What is pgAdmin?</span><h2 id="what-h2">pgAdmin 4 — the official PostgreSQL GUI for Windows</h2>
<p>pgAdmin 4 is the official open-source administration and development tool for PostgreSQL. It runs as a web application in your browser (served locally) and provides a visual interface for managing databases, running queries, viewing data, configuring users and monitoring server activity. It is bundled with the EDB Windows installer, so if you installed PostgreSQL via the standard installer, pgAdmin 4 is already available.</p>
</div>
<div class="section" aria-labelledby="launch-h2"><span class="section-label">Launch pgAdmin</span><h2 id="launch-h2">How to open pgAdmin 4 on Windows</h2><ul class="steps">
<li class="step"><div class="step-n">1</div><div><h3>Open from Start menu</h3><p>Press <strong>Win</strong> → search <strong>pgAdmin 4</strong> → click the result. pgAdmin launches a local server and opens in your default browser. The first launch can take 30–60 seconds.</p></div></li>
<li class="step"><div class="step-n">2</div><div><h3>Set a master password</h3><p>On first launch, pgAdmin asks you to set a <strong>master password</strong>. This password encrypts your saved server passwords within pgAdmin. It is separate from your PostgreSQL superuser password.</p></div></li>
<li class="step"><div class="step-n">3</div><div><h3>Connect to your PostgreSQL server</h3><p>In the left panel, right-click <strong>Servers</strong> → <strong>Register → Server</strong>. Fill in the connection details:</p>
<div class="term"><div class="term-bar"><div class="term-dot" style="background:#ff5f56"></div><div class="term-dot" style="background:#ffbd2e"></div><div class="term-dot" style="background:#27c93f"></div><span class="term-label">pgAdmin — Register Server dialog</span></div><div class="term-body"><div><span class="t-v">Name (General tab): My Local DB</span></div><div><span class="t-v">Host (Connection tab): localhost</span></div><div><span class="t-v">Port: 5432</span></div><div><span class="t-v">Maintenance DB: postgres</span></div><div><span class="t-v">Username: postgres</span></div><div><span class="t-v">Password: your_postgres_password</span></div></div></div>
<p>Click <strong>Save</strong>. The server appears in the left panel — click it to connect.</p>
</div></li>
<li class="step"><div class="step-n">4</div><div><h3>Browse databases and run queries</h3><p>Expand the server → Databases → your database → Schemas → Tables. Right-click any table for quick actions. To run SQL, click <strong>Tools → Query Tool</strong>.</p></div></li>
</ul></div>
<div class="section" aria-labelledby="query-h2"><span class="section-label">Query tool</span><h2 id="query-h2">Run SQL queries in pgAdmin</h2>
<p>Open the Query Tool: select a database in the left panel → <strong>Tools</strong> menu → <strong>Query Tool</strong>. Type your SQL and press <strong>F5</strong> or click the Run button:</p>
<div class="term"><div class="term-bar"><div class="term-dot" style="background:#ff5f56"></div><div class="term-dot" style="background:#ffbd2e"></div><div class="term-dot" style="background:#27c93f"></div><span class="term-label">pgAdmin Query Tool</span></div><div class="term-body"><div><span class="t-v">SELECT table_name FROM information_schema.tables</span></div><div><span class="t-v">WHERE table_schema = 'public'</span></div><div><span class="t-v">ORDER BY table_name;</span></div><div></div><div><span class="t-cm">-- Results appear in the Data Output panel below</span></div></div></div>
</div>
<div class="section" aria-labelledby="tips-h2"><span class="section-label">Tips</span><h2 id="tips-h2">pgAdmin tips for Windows users</h2><div class="faq">
<div class="faq-item"><details><summary>pgAdmin takes a long time to open</summary><div class="faq-ans">pgAdmin 4 runs a Python web server locally. First launch is slow (30–60 seconds) because Windows Defender and other security software may scan it. Subsequent launches are faster. You can add the pgAdmin folder to your antivirus exclusion list to speed things up.</div></details></div>
<div class="faq-item"><details><summary>pgAdmin shows "Unable to connect to server"</summary><div class="faq-ans">Check that: (1) the PostgreSQL service is running (<code>sc query postgresql-x64-18</code>), (2) you are using the correct port (default 5432), (3) the host is <code>localhost</code> for local connections. If you changed the port, update the pgAdmin connection.</div></details></div>
<div class="faq-item"><details><summary>I forgot my pgAdmin master password</summary><div class="faq-ans">The master password can be reset by deleting the pgAdmin preferences file. Go to <code>%APPDATA%\pgAdmin</code> and delete <code>pgadmin4.db</code>. Note: this also deletes your saved server passwords — you will need to re-enter them.</div></details></div>
<div class="faq-item"><details><summary>How do I update pgAdmin without reinstalling PostgreSQL?</summary><div class="faq-ans">pgAdmin can be updated independently of PostgreSQL. Download the latest pgAdmin 4 installer from <a href="https://www.pgadmin.org/download/pgadmin-4-windows/" rel="noopener">pgadmin.org</a> and run it. It updates pgAdmin in place without touching your PostgreSQL installation.</div></details></div>
</div></div>
<div class="cta-banner"><div><h2>Prefer the command line?</h2><p>Learn essential psql commands for Windows.</p></div><a href="/psql-commands-windows.html" class="btn-white"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>psql commands guide</a></div>
<div style="margin-bottom:32px"><span class="section-label">Related guides</span><div class="rel-grid"><a href="/psql-commands-windows.html" class="rel-card"><div class="rel-title">psql commands →</div><div class="rel-sub">command line alternative</div></a><a href="/postgresql-allow-remote-connections.html" class="rel-card"><div class="rel-title">Remote connections →</div><div class="rel-sub">connect from other machines</div></a><a href="/postgresql-password-windows.html" class="rel-card"><div class="rel-title">Reset password →</div><div class="rel-sub">lost postgres password</div></a></div></div></main>
<aside class="content-sidebar"><div class="sb-card"><div class="version-badge-label">Latest stable</div><div class="version-badge-val">18.3</div><div class="version-badge-sub">Released May 2026</div></div><div class="sb-card"><div class="sb-card-title">Install & setup</div><ul class="sb-links"><li><a href="/download-windows.html">Download PostgreSQL</a></li><li><a href="/offline-installer.html">Offline installer</a></li><li><a href="/configure-windows-service.html">Windows service</a></li><li><a href="/fix-path-issues.html">Fix PATH / psql</a></li><li><a href="/pgadmin-windows.html" class="cur">pgAdmin 4</a></li><li><a href="/install-postgresql-windows-server.html">Windows Server</a></li></ul></div><div class="sb-card"><div class="sb-card-title">Configuration</div><ul class="sb-links"><li><a href="/postgresql-config-windows.html">postgresql.conf</a></li><li><a href="/postgresql-port-5432.html">Port 5432</a></li><li><a href="/postgresql-allow-remote-connections.html">Remote connections</a></li><li><a href="/postgresql-password-windows.html">Reset password</a></li></ul></div><div class="sb-card"><div class="sb-card-title">Tools & help</div><ul class="sb-links"><li><a href="/psql-commands-windows.html">psql commands</a></li><li><a href="/pg-dump-restore-windows.html">Backup & restore</a></li><li><a href="/postgresql-python-windows.html">Python / psycopg2</a></li><li><a href="/odbc-driver-x64-x86.html">ODBC driver</a></li><li><a href="/postgresql-not-starting-windows.html">Service not starting</a></li><li><a href="/postgresql-uninstall-windows.html">Uninstall</a></li><li><a href="/postgresql-windows-faq.html">FAQ</a></li></ul></div></aside>
</div></div>
<footer class="site-footer"><div class="wrap">
<div class="footer-inner">
<div>
<div class="footer-logo"><div class="footer-logo-mark">Pg</div><span class="footer-logo-name">PostgreSQL for Windows</span></div>
<p class="footer-tagline">Unofficial Windows guide for PostgreSQL — download, install, configure, troubleshoot.</p>
</div>
<div>
<div class="footer-col-title">Install & setup</div>
<ul class="footer-links">
<li><a href="/download-windows.html">Download PostgreSQL</a></li>
<li><a href="/offline-installer.html">Offline installer</a></li>
<li><a href="/configure-windows-service.html">Windows service</a></li>
<li><a href="/fix-path-issues.html">Fix PATH / psql</a></li>
<li><a href="/pgadmin-windows.html">pgAdmin 4</a></li>
</ul>
</div>
<div>
<div class="footer-col-title">Configuration</div>
<ul class="footer-links">
<li><a href="/postgresql-config-windows.html">postgresql.conf</a></li>
<li><a href="/postgresql-port-5432.html">Port 5432</a></li>
<li><a href="/postgresql-allow-remote-connections.html">Remote connections</a></li>
<li><a href="/postgresql-password-windows.html">Reset password</a></li>
<li><a href="/install-postgresql-windows-server.html">Windows Server</a></li>
</ul>
</div>
<div>
<div class="footer-col-title">Tools & help</div>
<ul class="footer-links">
<li><a href="/psql-commands-windows.html">psql commands</a></li>
<li><a href="/pg-dump-restore-windows.html">Backup & restore</a></li>
<li><a href="/postgresql-not-starting-windows.html">Service not starting</a></li>
<li><a href="/postgresql-uninstall-windows.html">Uninstall</a></li>
<li><a href="/postgresql-windows-faq.html">FAQ</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>Not affiliated with the PostgreSQL Global Development Group. Unofficial community guide.</p>
<p><strong>Affiliate disclosure:</strong> Download links may be partner links.</p>
</div>
</div></footer>
<div class="cookie-bar" id="cookieBar" style="display:none">
<p>We use Google Analytics for anonymous traffic data. <a href="/privacy.html">Privacy policy</a></p>
<div class="cookie-btns"><button class="cookie-accept" id="cookieAccept">Accept</button><button class="cookie-decline" id="cookieDecline">Decline</button></div>
</div>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MHLW57MR8Q"></script>
<script>
window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}
gtag('consent','default',{analytics_storage:'denied',ad_storage:'denied'});
gtag('js',new Date());gtag('config','G-MHLW57MR8Q',{anonymize_ip:true,send_page_view:false});
function grantGA(){gtag('consent','update',{analytics_storage:'granted'});gtag('event','page_view',{page_location:location.href,page_title:document.title})}
document.addEventListener('DOMContentLoaded',function(){
var bar=document.getElementById('cookieBar');
var c=localStorage.getItem('pg_consent');
if(!c){bar.style.display='flex'}else if(c==='1'){grantGA()}
document.getElementById('cookieAccept').addEventListener('click',function(){localStorage.setItem('pg_consent','1');grantGA();bar.style.display='none'});
document.getElementById('cookieDecline').addEventListener('click',function(){localStorage.setItem('pg_consent','0');bar.style.display='none'});
});
</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"HowTo","name":"Set Up pgAdmin 4 on Windows","description":"How to launch pgAdmin 4, connect to PostgreSQL and run queries on Windows.","step":[{"@type":"HowToStep","position":1,"name":"Open pgAdmin","text":"Search pgAdmin 4 in Start menu and launch"},{"@type":"HowToStep","position":2,"name":"Set master password","text":"Choose a master password on first launch"},{"@type":"HowToStep","position":3,"name":"Register server","text":"Right-click Servers > Register > Server > fill connection details"},{"@type":"HowToStep","position":4,"name":"Run queries","text":"Tools > Query Tool > type SQL > F5 to run"}]}</script>
<script>var el=document.getElementById("nl-pgadmin");if(el)el.classList.add("active");</script>
</body></html>