-
Notifications
You must be signed in to change notification settings - Fork 88
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 using password with special characters #232
Comments
Does it happen only with AWS RDS or also with a local database? Is the URL you provided just an example how the URL looks? It points to localhost, and you are mentioning that there is an issue with RDS. |
I'm just starting with the plugin so I didn't know there were other means for providing the connection, I'll take a look to see if those work |
I'm assuming that SSH tunnel is the issue. Did you try using https://github.com/pbogut/vim-dadbod-ssh ? |
Actually I use AWS session manager to establish the tunnel because the bastion server is not public, so is not an actual SSH connection but rather a command like this:
However I wonder why it also fails for local postgres launched with docker |
Does everything work locally or on RDS when there is no |
Confirmed that it works locally when there is no Vim version:
|
Can you try applying this patch to your local diff --git a/autoload/db_ui.vim b/autoload/db_ui.vim
index d944db7..419fd29 100644
--- a/autoload/db_ui.vim
+++ b/autoload/db_ui.vim
@@ -422,7 +422,7 @@ endfunction
" we don't want to do.
function db_ui#resolve(url) abort
let parsed_url = db#url#parse(a:url)
- let ignored_resolve_schemes = ['ssh']
+ let ignored_resolve_schemes = ['ssh', 'postgres', 'postgresql']
if index(ignored_resolve_schemes, get(parsed_url, 'scheme', '')) > -1
return a:url If you added a connection through "Add connection", delete and re-add it. |
Cool, after adding that patch I was able to connect using the escaped password with |
Ok, thanks for testing it. I'll fix it and let you know to give it another test. |
I pushed a change to master. Can you pull latest changes and see if it works? |
@kristijanhusak I am experiencing this issue as well with a
|
@wstewarttennes in which part of db connection string? Did it work before this change? Does vim-dadbod directly work? |
@kristijanhusak thanks for the quick reply, in the password field -- I have solved this by using |
I confirm that the issue was fixed in the latest pull. |
Ok great, thanks! |
I'm unable to establish a connection to a postgres database hosted in AWS RDS that has the special character
$
as part of the password. The error I'm getting is...The password that was provided for the role postgres is wrong...
.I tried escaping the
$
symbol using%24
with no success, and I'm able to establish the connection using raw vim-dadbod with the escaped password.The url that I'm using is
postgresql://postgres:[REDACTED]@127.0.0.1:5432
The text was updated successfully, but these errors were encountered: