Problem connecting to distant postgreSQL database
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello everybody,
My problem is that when I connect to a distant psql database I have the following error:
'FATAL: password authentication failed for user "[username]"',
But the password is CORRECT !!!
I've checked with the database manager...
I can connect to the database through the PSQL Shell, it works! It is just with matlab. I have to connect with SSL on, so I use the following code line:
conn = database('dbname','username','password','org.postgresql.Driver','jdbc:postgresql:dm-userdb.geomar.de:users:ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&');
following the matlab documentation.
The database manager thinks that it must be a problem with the syntax I use in matlab since the connection works with the shell, but he is not fluent in matlab so he cannot help me.
Moreover when I create a local database on my computer I can connect to it with matlab. It is only the connection to that distant database in SSL mode with matlab (in SSL Off it is not working either...)!
Connecting to this database with R or python is working. With R the code is:
install.packages("rpostgres") library(RPostgreSQL) drv <- dbDriver("PostgreSQL") con <- dbConnect(drv, host = "dm-userdb.geomar.de", dbname="users", tty = "NULL", user="****", password = "******", port = "5432")
But since we will have users of this DB using different software we have to make it works also with Matlab, and I don't know what is wrong with my script!
I have a mac book air with maverick and matlab R2013a,
Will be very nice if someone has a clue of what is wrong!
thanks a lot,
Pieter
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Database Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!