Setup and Introduction to SQL Fundamentals

InstructorTyler Clark

Share this video with your friends

Send Tweet

This course is designed to take someone that has no experience with relational databases and teach them how to at least create, read, update, and delete. We'll explore many different aspects of SQL and what makes working in relational databases easy. This video also goes over how to install postgres on your machine so you can follow along.

Install Homebrew for Mac

https://brew.sh/

Windows postgres installer

https://www.postgresql.org/download/windows/

Sergey
~ 5 years ago

After installing postgres on Ubuntu 18 (via WSL) using official documentation https://www.postgresql.org/download/linux/ubuntu/, I run into multiple issues. This comment might help someone who also wants to install postgres on WSL. First issue was about how to run server, because psql was complaining. In order to resolve that I had to do following:

  • sudo chown postgres /var/log/postgresql
  • sudo ln -s /etc/postgresql/10/main/postgresql.conf /var/lib/postgresql/10/main/postgresql.conf
  • sudo ln -s /etc/postgresql/10/main/conf.d /var/lib/postgresql/10/main/conf.d
  • sudo -u postgres /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l /var/log/postgresql/logfile start

After that, in order to run psql I used following command: sudo -u postgres psql postgres

Sri-Ni.
~ 5 years ago

I ran into this issue.

$ psql postgres
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

I did this to get it to work.

$ brew services start postgresql
==> Tapping homebrew/services
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 14 (delta 0), reused 8 (delta 0), pack-reused 0
Unpacking objects: 100% (14/14), done.
Tapped 1 command (43 files, 59.6KB).
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)

$ psql postgres
psql (11.5)
Type "help" for help.

postgres=#
blackoperat
~ 5 years ago

Do you have to create a database first ?

Will Johnson
~ 5 years ago

Do you have to create a database first ?

Hi @blackoperat, if you're talking about this lesson all you would have to do ins download and install postgres everything else will walked through in the lessons. Let me know if that helps!