How to Install PostgreSQL & pgAdmin 4 on Windows 10

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys in this video I'm going to show you how you can download and install PostgreSQL on your Windows 10 operating system Foursquare SQL is a powerful open source object relational database system so let's see how we can download and install it so first of all open your favorite browser and search for PostgreSQL the first link which will appear here will be from post square SQL thought Rajee so does just click this link and on this website on the top you will be able to see this download tab so you just need to click the download tab and then you just need to search for Windows option right so because it's open source and cross-platform database management system it's available for Linux Mac OS and other operating systems also including Windows so we just need to choose Windows here and then here you just need to click this link which says download the Installer and now we are going to choose the version of the PostgreSQL which we want to install so from here you just need to select the latest version which is at the top in my case it's nine point six point two at the time of making this video but it can be a later on latest version in your case right and now you need to choose the Windows operating system x86 64 bit ok so just choose this option now click download now which is going to download the PostgreSQL executable file so I can see this option for downloading this executables file it says PostgreSQL 9.6 at the time of making this video and this executable is about 164 megabytes so keep in mind that also so let's save it and once this file is saved we are going to installing it so I will pause the video while this executable file is downloaded and then we will see how to install it so now the download of this executable file is complete so I'm going to double click on this executable file and I'm going to minimize my browser and in the first step this PostgreSQL executable will ask us to give the user account control so just click yes at this time and apparently this installation requires Microsoft Visual C++ 2013 redistributable so it will download it automatically you don't need to do anything but I can see this step that it's installing this Microsoft Visual C++ 2013 so let it run and now the setup wizard will start for PostgreSQL so the first step is easy just click Next and this is the location where post gray will be installed on your Windows 10 operating system if you don't have the good reason to change it just leave it as default and click Next and this also just leave it as default and click Next and this is the important step here you need to give a password which you can remember because you are going to require this password later when you want to you know access your co square database right so just give the password which you can remember I'm going to give a easy password which I can remember and which is also secure right and then I will click Next and this is the default port which will be used by your post Kwai database management system so just leave it as default if you don't have the good reason to change it right and then just click Next and here it says select the locale to be used by the new database class so if you are not sure about the locale you just need to leave it as default okay so I am going to leave it as default and click Next and in the next step it says setup is now ready to begin installing PostgreSQL on your computer so click Next and then the installation will start for PostgreSQL so now the installation of PostgreSQL on my Windows 10 operating system is complete and I can see this method which is setup has finished installing PostgreSQL on your computer launched stake builder at exit now what is stake builder stake builder may be used to download and install additional tools drivers and application to complement your PostgreSQL installation that means drivers such as for example you if you are developing C++ application using PostgreSQL then drivers for that and other language support and other drivers also so I will leave it as check this check box and I will click finish which is going to start this stake builder okay now let's see what's there so in here I can see this PostgreSQL option here which is my local database if you have the remote server then you can choose this one but right now I want to connect to my local database so I will choose this option which is the second option and then click Next and in here I can see all these options but for now I don't want any of the add-ons or any of the drivers right so I'm going to click cancel if you will click Next it's going to tell you that you need to select any one of the packages from this list right so for now I'm going to cancel it because I don't want any driver or any add-on so I will click cancel and click yes now this take builder is installed on your system with the PostgreSQL installation so just go to your Start button here and then go to all apps and then we will go to the letter P and you will see PostgreSQL 9.6 here right so when you expand this you can see the stake builder is already installed so whenever you need any add-on or any you know package you can open this stake builder and install it right now in order to connect with your database which is your local database which you have installed you just need to click this option which says PG admin 4 okay so just click this option PG admin 4 which is going to start PG admin and the PG admin is going to look like this right now you just need to expand this so category here and you will be able to see this post square scale nine point six in your case it can be nine point seven or any latest version right now you will also be able to see this cross red cross symbol here that means you are not connected to your database right so just click on this PostgreSQL which is going to ask you for the password which you have given at the time of installation right so I told you to remember this password so you need to give the same password which you have given at the time of installation and you can save this password and then click OK and this is going to connect to your database so you can see server connected that means our connection is successful with the database I can maximize this PG admin and we can look at in a better way now in here you have the database category and then you have table spaces so go to databases and by default this post way has one database whose name is post quest itself right this is the sample database and then menu you will be able to see all these sections here so in the Chema's you will have this publish public section and then you will be able to see the tables here also so when you click the tables right now there is no tables inside your post quai SQL database but later when you you know create some tables you will be able to see those tables here right and then you have the properties here and the SQL here so you can execute your xql queries from here also with this PG admin now there is another tool which is called P SQL which is a command line tool which you can configure for your Windows terminal and first of all let's see where our PostgreSQL is installed so just open your folder Explorer and go to your C a directory and then in here I think its installed in my Program Files and then you can see PostgreSQL and then you can just click 9.6 version and then just click bin folder okay so here all the DLL files and all the executable files are there right and in here you will be able to see this tool which is called P SQL so you need to just set this P SQL in your environment variable and then you will be able to run your queries from your terminal also so just copy at this path which is up to bin right and then open your system so just search for system from here and then go to system in the control panel and in the advanced setting just click the advanced setting here you will be able to see environment variables and the environment variables in the system variables just select the path and double click it or you can just click add it also here so just double click on it and in here we are going to add the new paths so just click the new option here and then paste whatever parts you have copied for the PostgreSQL bin folder right so just paste this path here and then press Enter and now once again go to the folder where PostgreSQL is installed once again go to 9.6 folder and now this time just open the Lib folder from here so just click Lib and then copy this path also and then we will add this path also here so add new and then paste this path and press Enter so we have added the bin folder path and live folder path to our environment variables for PostgreSQL click OK click OK and then click ok once again now PostgreSQL or psql environment is set on your Windows operating system so now you can open the command prompt so right click on your Start menu and you can open the command prompt from here you can see the command prompt option or you can search for command from probe prompt here also so just search for CMD and you will be able to see command prompt and open it from there so here once the command prompt is there you can give the psql command so just give psql and then give the for example - you for the username and the default username is poor squares ok so you can just give posts graphs here and the database name is also post case in our case you can see on the PG admin here the default you know database name is also post squares ok so you can see the owner is Postgres and the database name is also post great so if you are confused you can see it in the PG admin also right so just click this day and you will be able to see there is the database name and this is the owner name right so both are same by default so I'm going to just give psql - you first is the username here post grave and second is the database name here so just give post grace once again post grace and post gives closes for username and second is for the database name and then + enter and now give you a password which you have given for the PG admin also so whatever you have selected your password at the time of installation you need to give it here also so I'm going to give my password and then press enter and now I am in the Postgres command shell right so for example there are some default options here for example when I give DT I think with the backslash DT it's going to give me the relations and for example I'm going when I'm going to give D U it's going to give me all the users which are there so right now I only have one user which is the post GRA user and it has the super user privileges which can create roles create DBS and replication so this is how you can use post square SQL or psql terminal also once you have installed post screen so this is how you can install post GRA on your Windows 10 operating system I hope you've enjoyed this video please rate comment subscribe and bye for now
Info
Channel: ProgrammingKnowledge
Views: 503,851
Rating: 4.8571429 out of 5
Keywords: Learning, PostgreSQL, Programming, Database, Clauses, Commands, Functions, Administration, Queries, Simple, Steps, Basic, Advanced, Concepts., Install PostgreSQL, PostgreSQL 9.6, pgAdmin 4, Windows 10, pgAdmin, How to Install, PostgreSQL 10, How to Install PostgreSQL, pgAdmin 4 on Windows 10, PostgreSQL & pgAdmin 4, PostgreSQL administration tool, EnterpriseDB
Id: e1MwsT5FJRQ
Channel Id: undefined
Length: 14min 57sec (897 seconds)
Published: Thu Apr 06 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.