Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign updiesel_cli connection info string error #1188
Comments
This comment has been minimized.
|
I think you just need to put it between quotes --database-url "postgres://myuser:mypassword@localhost/mydb" |
This comment has been minimized.
dlukes
commented
Sep 22, 2017
|
Doesn't seem to help :( I also tried using an env variable and the |
This comment has been minimized.
|
Oh sorry, I can't read... It's not the shell that's saying that, it's PG itself. Do you have any special character in the password ? If so I think you need to percent encode them |
This comment has been minimized.
dlukes
commented
Sep 22, 2017
•
|
That was my thinking as well initially :) To be more precise, I didn't know specifically I needed to percent encode them (thanks for the info!) but I figured special characters might be a problem, so I changed my password and still no dice... And even when I put a wrong password in there with just ASCII letters, the error is still the same (i.e. it doesn't seem to even get to the stage where it tries to connect to the database cluster). If it's relevant somehow, this is a PostgreSQL server installed from source, running under my user on a server I don't have root on. Connecting to databases with the |
This comment has been minimized.
|
Can you confirm that you installed |
This comment has been minimized.
dlukes
commented
Sep 22, 2017
|
I wanted both sqlite and postgres support, so what I did was |
This comment has been minimized.
|
It should work fine if compiled with both SQLite and PG support. |
This comment has been minimized.
|
Unfortunately I'm unable to reproduce. Does your username or password contain any special characters? |
This comment has been minimized.
dlukes
commented
Sep 22, 2017
Username is plain ASCII letters, the password I originally tried it with contains also numbers and a period, but I changed it and the behavior remained the same (see previous comment). FWIW, when I try to use a sqlite database instead of postgres, the database is successfully created but running the initial migration fails with a syntax error, which is weird because when I feed the migration script to the command line So maybe something went wrong during compilation? As I mentioned, both the sqlite and postgres libraries are installed in nonstandard locations, I had to set |
This comment has been minimized.
|
Can you provide the output of |
This comment has been minimized.
|
Also just to confirm, you're seeing this error message when using exactly the URL |
This comment has been minimized.
|
One other thing you could try is changing the scheme to I suspect that you're loading some older versions of libpq (possibly system libraries), and need to set your |
This comment has been minimized.
dlukes
commented
Sep 22, 2017
yes
This was good thinking, thank you very much! I did So thanks again, after setting LD_LIBRARY_PATH, everything works as expected. The error must have been the result of some weird interaction with the older versions of the libraries. Closing. |
dlukes
closed this
Sep 22, 2017
This comment has been minimized.
dlukes
commented
Sep 22, 2017
Yes you're exactly right :) Thanks again! |
This comment has been minimized.
|
No problem |
dlukes commentedSep 22, 2017
I'm trying to set up a new database using
diesel_cli, but I get the following error:I'm not sure where I should put the
=sign, especially since the connection info string reported in the error refers to the postgres database, whereas the database URL I specified refers to the database I'm trying to initialize... Thanks for any pointers!Versions
Feature Flags