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

connect by ip address #393

Closed
alorylic opened this issue Dec 20, 2021 · 2 comments
Closed

connect by ip address #393

alorylic opened this issue Dec 20, 2021 · 2 comments

Comments

@alorylic
Copy link

use this:
let db = Database::connect("postgresql://username:password@ipAddress/mydb").await.unwrap();
Err:
thread 'main' panicked at 'called Result::unwrap() on an Err value: Conn("error occurred while attempting to establish a TLS connection: InvalidDNSNameError")'
but this is ok:
let db = Database::connect("postgresql://username:password@domainName/mydb").await.unwrap();
So, do I have to use the domain name?

@billy1624
Copy link
Member

Hey @LucienGCW, welcome!! Thanks for reaching out. Can you see if this is helpful?

Related #310

@alorylic
Copy link
Author

Hey @LucienGCW, welcome!! Thanks for reaching out. Can you see if this is helpful?

Related #310

Oh,thanks.
The problem was solved when i use "runtime-tokio-native-tls" instead of "runtime-tokio-rustls",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants