innovationOUtside / tm351vm-binder

See if we can generate a Binder/repo2docker build of the TM351 VM
MIT License
7 stars 4 forks source link

password authentication fails for notebook 08.1 #17

Open undercertainty opened 4 years ago

undercertainty commented 4 years ago

We've got the DB_CONNECTION string set up as:

postgresql://tm351_student:tm351_pwd@localhost:5432/tm351_clean

Making the connection with %sql $DB_CONNECTION then gives the error:

(psycopg2.OperationalError) FATAL:  password authentication failed for user "tm351_student"

(Background on this error at: http://sqlalche.me/e/e3q8)
Connection info needed in SQLAlchemy format, example:
               postgresql://username:password@hostname/dbname
               or an existing connection: dict_keys([])
psychemedia commented 4 years ago

That is because user/password tm351admin/tm351admin is not set (db init in https://github.com/innovationOUtside/tm351vm-binder/blob/master/init_db/postgres/init_db.sh ).

Do we want those user credentials setting? With what permissions? In the original VM we had:

CREATE USER tm351admin WITH PASSWORD 'tm351admin' SUPERUSER;

undercertainty commented 4 years ago

Yeah, set them the same as they were in the original VM. Otherwise we're guaranteed to find that there's some bit of the materials lurking somewhere that assumes the various users and passwords of the 18J VM and then raises an error.

I think that as far as possible, we should be fitting the machine to the existing notebooks, rather than the other way round. That would seem to minimise the risk of anything breaking.