Home > Enterprise >  IHP - How to connect IHP's Postgres instance with Moodle?
IHP - How to connect IHP's Postgres instance with Moodle?

Time:04-29

I'm trying to connect IHP's Postgres instance with Moodle. The IHP Guide uses postgresql:///app?host=YOUR_PROJECT_DIRECTORY/build/db with the development server running to connect however Moodle further requires Database host, name, user, password, port, Tables prefix and Unix Socket to connect.

CodePudding user response:

IHP uses a Postgres socket file to connect, the socket file is located at YOUR_PROJECT_DIRECTORY/build/db/.s.PGSQL.5432. The database name is app, there is no password. For example, with psql you can connect to the database as: psql -h $PWD/build/db -d app.

I'm not sure why are you trying to connect IHP with Moodle? IHP dev server starts and restarts the Postgres database as you are developing, ./start would start the database, and as soon as you exit, the database is stopped. However, it seems Moodle requires a database running forever in order to function.

  • Related