Wanted to add that if by any chance you already have psql installed on your local machine serving the port 5432, tableplus will try to connect to that local psql instance. To work around this, when running the docker set your port to 5433:5432 (just an example) and then choose port 5433 on tableplus.
Thanks for such a detailed tutorial! One question for more understand: as I know, all data on Docker containers destroyed, when I stop container. So, how to save database data using Docker? For example, for backup or transfer between servers? Would be great to video tutorial or dev.to article about this process.
Hi Vic, good question! To make sure data is not deleted when the container is removed, we should use docker volume. I will definitely make a video about it in the future lectures. Also posted this article on dev: dev.to/techschoolguru/install-use-docker-postgres-table-plus-to-create-db-schema-44he
Connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "root" this shows up everytime i try to connect with tableplus can you help with this?
Hi I am doing exactly what's said in the video but have trouble connecting to the database from TablePlus; it says "role root doesn't exist". What could I have done wrong? Thanks.
Brilliant tutorial. I am stuck at testing the database (9:40) with TablePlus. I am receiving `FATAL: role "root" does not exist`. Help would be greatly appreciated!
Hi Connor, Did you run this exact query to create the postgres container? docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine Also, make sure that there's no other hidden postgres server running on the host machine that can cause the conflicts.
So for anyone following this process with WSL2 in Windows, maybe you tried to connect to postgres from TablePlus and it send an error. That is because Docker doesn't share the same IP address when installed with WSL2. So to access the server in the Docker container: - Find out the IP of your WSL session. Type "ip a" from within WSL2. - Connect to TablePlus with the address of the WSL session. Example of the Docker container address I got 172.20.190.192/20. And remove the /20 when connecting to TablePlus
Hi Sajir, you can install db directly on your host machine, it will also work. But I recommend using docker because it's very easy to install, remove, update db version, or run multiple db instances if we want.
@@TECHSCHOOLGURU Docker installation seems like a big big task in a windows home edition, since it requires hyper-v (according to windows documentation).
Hi, I am new to databases, can we also use table plus if our container is running on the cloud? I guess we can't. So maybe it's better to not use GUI tools?
Thnks so much. Issue connecting to tableplus. I'm receiving error: "FATAL: role "root" does not exist" for the credential area "database" . It doesnt accept root
Hey Jack, make sure you pass these environment variables when running the container: POSTGRES_USER and POSTGRES_PASSWORD. Here's the command: docker run --name postgres12 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:12-alpine You can find all detailed commands in this post: dev.to/techschoolguru/install-use-docker-postgres-table-plus-to-create-db-schema-44he Also if you have other postgres server instance installed on your host machine, you should remove it completely to avoid conflict.
at 8:00 you can also just type the first character(s) of the docker id. if there is only one id that starts with 7 (79711fc0f51c) you can use $ docker exec -it 7 psql
I need a small help when I am trying to execute exported postgres sql query in tableplus it is showing "error: relation "transfer" does not exist", can anyone help me out here
Make sure you have created the "transfers" table in your migration SQL files. Here's my code: github.com/techschool/simplebank/blob/master/db/migration/000001_init_schema.up.sql#L16 And note that the table name is "transfers" with an "s", not just "transfer". If you want more help, feel free to join Tech School's discord server to chat directly with me and other students: discord.com/invite/BksFFXu
Hi Mehmet, can you tell me what error did you get? Make sure you have used port mapping when running the container, and enter the correct username and password to TablePlus. Here's the docker run command: docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine
@@TECHSCHOOLGURU Sorry for delay, I didn't get notification bro. I solved the issue by cleaning my local postgres installation leftovers on my machine. Now it's works.
Hello, I got the error when creating a connection on TablePlus. I have tried to search around but couldn't fix it. Could anyone pls help? "server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request."
Hey, any recommendations for an alternative to tableplus? Its linux version is still an alpha release and crashes right at the start (regarding their Github repo, this error is already known).
I just wonder what am I doing wrong. When I connect to DB using DBeaver, everything works fine and I can see my tables, but when I try to use TablePlus they are jus not there. There are a lot of random tables that are not visible in the beaver but visible in table plus. Ok, I figured it out. For those on linux(ubuntu), be aware if you have docker and docker desktop installed. They have different contexts.
Why are you stuck? I also use the free version of TablePlus. We can still use all of its features, except that there can be at most 2 tabs open at the same time. So just close 1 tab before trying to open the third one, and it should work fine. Having said that, using TablePlus is not mandatory. You can always use any other Postgres GUI client tool to connect to the database: scalegrid.io/blog/which-is-the-best-postgresql-gui-2021-comparison/
I have issues with connecting to TablePlus. I have previuosly installed PostgreSQL and pgAdmin. After pulling image from docker hub, creating a postgres container with port number, username and password details. But when I install TablePlus and try to connect to postgres database but the issue is coming up. Then, I uninstalled the PostgreSQL and pgAdmin, but now I have totally different error such as " could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? " Does anyone faced this issue? P.S: I am using Windows 10 Home (installed Docker Tool Box)
Hi Jeremy, make sure your postgres container is up and running, and has correct port mapping. Run this command: docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f9cdf61fcb0a postgres:12-alpine "docker-entrypoint.s…" 2 months ago Up 7 days 0.0.0.0:5432->5432/tcp postgres12
@@TECHSCHOOLGURU it is up and running and port numbers are correct. Also, I went into my container and created another database. container name: some-postgres; username: postgresdb See the code from my VSCode Terminal below: $ docker exec -it some-postgres bash bash-5.0# psql -U postgresdb psql (13.0) Type "help" for help. postgresdb=# create database simple_bank; CREATE DATABASE postgresdb=# create database postgresdb; ERROR: database "postgresdb" already exists postgresdb=# \q bash-5.0# psql -h localhost -p 5432 -U postgresdb -W Password: psql (13.0) Type "help" for help. postgresdb=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -------------+------------+----------+------------+------------+--------------------------- postgres | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 | postgresdb | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 | simple_bank | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 | template0 | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgresdb + | | | | | postgresdb=CTc/postgresdb template1 | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgresdb + | | | | | postgresdb=CTc/postgresdb (5 rows) postgresdb=# \c Password for user postgresdb: You are now connected to database "postgresdb" as user "postgresdb". postgresdb=# \q bash-5.0# \q bash: q: command not found bash-5.0# exit exit As you can see from the code using terminal, the container is working fine BUT still I cannot connect it to TablePlus. Is there any alternatives for TablePlus or do I have to install PostgreSQL too (I do not have PostgreSQL installed at the moment)?
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 84f3b59b9fc4 postgres:13-alpine "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:5432->5432/tcp some-postgres I have re-installed PostgreSQL 13 now, and it is giving different error: FATAL: password authentication failed for user "postgresdb"
I do everything just like the video , but when I try to connect to postgres with table plus even tho I'm sure the password is correct, I get fatal:password authentication failed for user "root" , can anyone help me with this ??
Man you are so clear on your lectures
The clarity and pace of your teaching are just perfect.
Thanks! Great to hear that.
teaching me what university failed to, thank you so much. These videos deserve millions of views.
Wow, thank you!
Just pure respect for the clarity and the quality of information you voluntarily share with us all.
I appreciate that!
Perfect, nothing to say or add! thank you for your effort and for sharing this all knowledge with us!
Wanted to add that if by any chance you already have psql installed on your local machine serving the port 5432, tableplus will try to connect to that local psql instance.
To work around this, when running the docker set your port to 5433:5432 (just an example) and then choose port 5433 on tableplus.
Thanks
I was getting an error that my password was failing. Changing my port this way fixed it.
thanks so much
thanks Alves!!
Thanks this worked
Hi, TECH SCHOOL, you just made my day with this awsome playlist
Glad you liked it!
I'm so excited to go through this entire series! Thank you for it!!
Thank you! Have fun!
Brian is making progress
Nevr before ever after , such a nice explanation on db design
Thanks a lot 😊
You helped me solve my port bridging. Thanks. Great explaination.
Great to hear!
For the rest of the series are we going to use WSL or Poweshell ?
Thanks for such a detailed tutorial!
One question for more understand: as I know, all data on Docker containers destroyed, when I stop container. So, how to save database data using Docker? For example, for backup or transfer between servers? Would be great to video tutorial or dev.to article about this process.
Hi Vic, good question! To make sure data is not deleted when the container is removed, we should use docker volume. I will definitely make a video about it in the future lectures.
Also posted this article on dev: dev.to/techschoolguru/install-use-docker-postgres-table-plus-to-create-db-schema-44he
Connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "root" this shows up everytime i try to connect with tableplus can you help with this?
Content is amazing love to learn more 😍😍😍
Thanks!
Hi I am doing exactly what's said in the video but have trouble connecting to the database from TablePlus; it says "role root doesn't exist". What could I have done wrong? Thanks.
Brilliant tutorial. I am stuck at testing the database (9:40) with TablePlus. I am receiving `FATAL: role "root" does not exist`. Help would be greatly appreciated!
Hi Connor,
Did you run this exact query to create the postgres container?
docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine
Also, make sure that there's no other hidden postgres server running on the host machine that can cause the conflicts.
@@TECHSCHOOLGURU Thank you, I had a hidden postgres server running on my host machine!
@@connorcantrell1883 how did you fix this?
@@imabeastyaok `sudo pkill -u postgres`
same problem, i opened postgres application in the same time
So for anyone following this process with WSL2 in Windows, maybe you tried to connect to postgres from TablePlus and it send an error. That is because Docker doesn't share the same IP address when installed with WSL2. So to access the server in the Docker container:
- Find out the IP of your WSL session. Type "ip a" from within WSL2.
- Connect to TablePlus with the address of the WSL session.
Example of the Docker container address I got 172.20.190.192/20. And remove the /20 when connecting to TablePlus
Thank you!
Thanks
@Jeremy Johns Perhaps this comment can help you?
Thanks! Really helpful
thanks!! :)
Thanks for the tutorials. It helped me a lot.
Is there a way to use do database migrations without using docker?
Hi Sajir, you can install db directly on your host machine, it will also work.
But I recommend using docker because it's very easy to install, remove, update db version, or run multiple db instances if we want.
@@TECHSCHOOLGURU Docker installation seems like a big big task in a windows home edition, since it requires hyper-v (according to windows documentation).
Awesome video, very helpful. I prefer beekeeper studio community edition for database gui
Cám ơn bạn vì những video hướng dẫn
Thank you for videos! Great content for me.
Thanks for watching! Glad you like them!
Hi, I am new to databases, can we also use table plus if our container is running on the cloud?
I guess we can't. So maybe it's better to not use GUI tools?
Thank you, you helped me a lot.
Glad I could help!
where from you got these commands
Thnks so much. Issue connecting to tableplus. I'm receiving error: "FATAL: role "root" does not exist" for the credential area "database" . It doesnt accept root
Hey Jack, make sure you pass these environment variables when running the container: POSTGRES_USER and POSTGRES_PASSWORD. Here's the command:
docker run --name postgres12 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:12-alpine
You can find all detailed commands in this post: dev.to/techschoolguru/install-use-docker-postgres-table-plus-to-create-db-schema-44he
Also if you have other postgres server instance installed on your host machine, you should remove it completely to avoid conflict.
Cảm ơn anh, vids của anh thực sự rất hữu ích ! Chúc anh luôn mạnh khỏe !
seri này hay :D
Thank you!
at 8:00 you can also just type the first character(s) of the docker id.
if there is only one id that starts with 7 (79711fc0f51c) you can use $ docker exec -it 7 psql
good tip. thank you!
Is there a way to install it on windows without WSL?
very nice videos thanks a lot, can you make tutorial for mongodb too
I need a small help when I am trying to execute exported postgres sql query in tableplus it is showing "error: relation "transfer" does not exist", can anyone help me out here
Make sure you have created the "transfers" table in your migration SQL files.
Here's my code: github.com/techschool/simplebank/blob/master/db/migration/000001_init_schema.up.sql#L16
And note that the table name is "transfers" with an "s", not just "transfer".
If you want more help, feel free to join Tech School's discord server to chat directly with me and other students: discord.com/invite/BksFFXu
Thanks for great work but I could not connect dockerized postgres server to the table plus.
Hi Mehmet, can you tell me what error did you get?
Make sure you have used port mapping when running the container, and enter the correct username and password to TablePlus.
Here's the docker run command:
docker run --name postgres12 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:12-alpine
@@TECHSCHOOLGURU Sorry for delay, I didn't get notification bro. I solved the issue by cleaning my local postgres installation leftovers on my machine. Now it's works.
can you share the .sql file simple bank ?
You can find the SQL file in the simplebank repository: github.com/techschool/simplebank/blob/master/db/migration/000001_init_schema.up.sql
Hello, I got the error when creating a connection on TablePlus. I have tried to search around but couldn't fix it. Could anyone pls help?
"server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request."
Hey, any recommendations for an alternative to tableplus? Its linux version is still an alpha release and crashes right at the start (regarding their Github repo, this error is already known).
You can check out this page: wiki.postgresql.org/wiki/PostgreSQL_Clients
They listed several GUI db clients for each platform
@@TECHSCHOOLGURU Thank you for the quick reply and especially for this educational course.
I just wonder what am I doing wrong. When I connect to DB using DBeaver, everything works fine and I can see my tables, but when I try to use TablePlus they are jus not there. There are a lot of random tables that are not visible in the beaver but visible in table plus.
Ok, I figured it out. For those on linux(ubuntu), be aware if you have docker and docker desktop installed. They have different contexts.
Hello man, i'm having the same error, how did u get through?
@@MrBahciao I didn't. I just installed DataGrip.
amazing !!
Thank you!!
I just wanted to know if we want to upload video and images how can we do that ??
Sure there will be a video about it in future lectures.
Docker container keeps on stopping! I am using mysql database in windows..
got it running using.. docker run --name mysql12 -p 3303:3306 -e MYSQL_ROOT_PASSWORD=secret -d mysql
Logged in into mysql using.. docker exec -it mysql13 mysql -uroot -psecret
安装 docker 之后使用 docker ps 找 containers,使用 docker images 找镜像
到 docker hub 网站找 postgre,点击官方的安装相关命令,然后装 12-alpine
docker pull 指定版本
docker run 设置 root 名字 密码 背景 从镜像中得到不同的容器
后续注意用 -p 安装对应镜像接口
然后启动容器,使用 docker exec -it 容器NAMES psql(启动 console) -U root(以根目录用户启动)
此时注意是不需要输入密码的,默认就是不用
此时可以使用各种 query 命令
postgre 可以有自己的 docker 相关镜像设置,跟随教程可以完成用户名、密码和端口设置
其实看后面有 tablePlus 专门设置相关内容,此时设置之前的 .sql 文件默认打开,注意修改之前的文件设置为 not null
why not use pgAdmin ?
You can use pgAdmin as well. I use TablePlus because I like it.
I'm stuck because tableplus is on trial
Why are you stuck? I also use the free version of TablePlus. We can still use all of its features, except that there can be at most 2 tabs open at the same time. So just close 1 tab before trying to open the third one, and it should work fine.
Having said that, using TablePlus is not mandatory. You can always use any other Postgres GUI client tool to connect to the database: scalegrid.io/blog/which-is-the-best-postgresql-gui-2021-comparison/
@@TECHSCHOOLGURU yeah nvm I thought it says 2 table sorry
I have issues with connecting to TablePlus.
I have previuosly installed PostgreSQL and pgAdmin.
After pulling image from docker hub, creating a postgres container with port number, username and password details.
But when I install TablePlus and try to connect to postgres database but the issue is coming up.
Then, I uninstalled the PostgreSQL and pgAdmin, but now I have totally different error such as
" could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432? "
Does anyone faced this issue?
P.S: I am using Windows 10 Home (installed Docker Tool Box)
Hi Jeremy, make sure your postgres container is up and running, and has correct port mapping.
Run this command: docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f9cdf61fcb0a postgres:12-alpine "docker-entrypoint.s…" 2 months ago Up 7 days 0.0.0.0:5432->5432/tcp postgres12
@@TECHSCHOOLGURU it is up and running and port numbers are correct. Also, I went into my container and created another database. container name: some-postgres; username: postgresdb
See the code from my VSCode Terminal below:
$ docker exec -it some-postgres bash
bash-5.0# psql -U postgresdb
psql (13.0)
Type "help" for help.
postgresdb=# create database simple_bank;
CREATE DATABASE
postgresdb=# create database postgresdb;
ERROR: database "postgresdb" already exists
postgresdb=# \q
bash-5.0# psql -h localhost -p 5432 -U postgresdb -W
Password:
psql (13.0)
Type "help" for help.
postgresdb=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------+------------+----------+------------+------------+---------------------------
postgres | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 |
postgresdb | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 |
simple_bank | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 |
template0 | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgresdb +
| | | | | postgresdb=CTc/postgresdb
template1 | postgresdb | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgresdb +
| | | | | postgresdb=CTc/postgresdb
(5 rows)
postgresdb=# \c
Password for user postgresdb:
You are now connected to database "postgresdb" as user "postgresdb".
postgresdb=# \q
bash-5.0# \q
bash: q: command not found
bash-5.0# exit
exit
As you can see from the code using terminal, the container is working fine BUT still I cannot connect it to TablePlus.
Is there any alternatives for TablePlus or do I have to install PostgreSQL too (I do not have PostgreSQL installed at the moment)?
Can you show me the result of this command: docker ps
And also the parameters you're using in TablePlus to connect to that db?
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
84f3b59b9fc4 postgres:13-alpine "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:5432->5432/tcp some-postgres
I have re-installed PostgreSQL 13 now, and it is giving different error:
FATAL: password authentication failed for user "postgresdb"
But the details are CORRECT 100%. Checked it multiple times
I do everything just like the video , but when I try to connect to postgres with table plus even tho I'm sure the password is correct, I get fatal:password authentication failed for user "root" , can anyone help me with this ??
same error let me know if you find the solution
Crafted by Merlin AI.
Crafted by Merlin AI.
docker ps shows nothing ? why
Perhaps your container is stopped (not running). You can try "docker ps -a" to list all containers to check that.
If you want to download the latest version of this software so links are given below!
prcrack.org/tableplus-crack-download/