Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Connect to Postgres #189

Closed
rohitcoderCdefense opened this issue Jun 4, 2022 · 5 comments
Closed

Unable to Connect to Postgres #189

rohitcoderCdefense opened this issue Jun 4, 2022 · 5 comments
Labels
support Support Requests

Comments

@rohitcoderCdefense
Copy link

Hi There,

I'm not sure, why i can't connect to postgres using this tool, credentials are correct. Postgres running on same server localhost:5432 used same username and password to login into psql and pgadmin4

Any ideas on this?

image

@morty29
Copy link

morty29 commented Jun 9, 2022

If you are using docker then localhost is a docker container rather than your host machine, use host.docker.internal instead to access it

@rohitcoderCdefense
Copy link
Author

@morty29 Sorry, for delay but i am not running with docker, i tested with docker today and your solution works with that, but not working with system postgres

@vrajat
Copy link
Member

vrajat commented Jun 23, 2022

This is problem with settings of postgresql on your local box. However it is hard to guess which setting is missing or misconfigured in your postgresql setup. Stackoverflow has a few different solutions. Can you try those? As such there is no restriction or known issue with using piicatcher with local postgres.

@vrajat vrajat added the support Support Requests label Jun 23, 2022
@yjagdale
Copy link
Contributor

Validated with host.docker.internal as hostname instead of localhost inside container and working as expected.
Also we have added docker-compose.yml which has databases along with playground container of python. You can use

piicatcher catalog add-mysql --name mariadb_password --username root --database piidb --uri host.docker.internal --port 3306 --password ROOT_ACCESS_PASSWORD
piicatcher catalog scan --source-name mariadb_password

@yjagdale
Copy link
Contributor

Closing the issue for now, Please reopen if still face issue.

@yjagdale yjagdale closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Support Requests
Projects
None yet
Development

No branches or pull requests

4 participants