D
Dokploy•7mo ago
EAlcazar

PostgreSQL can't be accessed using the external credentials

I created a DB using the create service, database option. I can access it and use it through other services in that project. I tried to temporarily expose it using the external port option, and I used the external host URL It doesn't connect, and no new logs appear. I tried with the postgres workbench and dbeaver. I can confirm I can connect to external databases (supabase) following the same format and also tried updating the port. I haven't added any env variables either
No description
3 Replies
TY
TY•7mo ago
Hi - I am new and was here was having a problem the other day (different issue), I will try to offer some suggestions. Check your firewall ports and that the databases container is exposing a port on the host. 1) Firewall ports open on server. (ensure port 3306 is open to external traffic). 2) Dokploy (if deployed the databases as a template) ensure the external port is also set from blank to 3306 (otherwise the external port will not be exposed on the dokploy host from a remote computer try to login from terminal : type mysql -udatabase_user -h123.123.123.123 -p
Note: replace database_user and 123.123.123.123 of your username an db server IP It should prompt you for password (to test quickly, just type gibberish and press enter) - Does it respond saying 'Access denied for user 'database_user'@'123.123.123.123' (using password: YES ) if so, try your real password and you should be in! If your database server is unreachable, it might be that it is not exposed and the connection is not making it through firewalls. I hope this was helpful!
No description
EAlcazar
EAlcazarOP•7mo ago
I forgot to expose the port in my instance. It worked. Thanks for the tip!
TY
TY•7mo ago
You're very welcome! Have fun! 🙂

Did you find this page helpful?