Configuring moin2 to use postgresql as the Wiki Engine

38 Views Asked by At

I'm trying to setup the Wiki Engine Configuration on the file wikiconfig.py to be able to use postgresql instead of the default filesystem (fs store) but I can't make it work, I've done all the imports (flask_sqlalchemy and sqlalchemy),edited the URI as written in the guide https://buildmedia.readthedocs.org/media/pdf/moin-20/latest/moin-20.pdf and changed the name of the database I want to use, the name and the password of the chosen user but every time I start the server and try to log on the platform I get an internal server error. Any ideas on what could cause this problem?

The command I used was:

    stores:sqla:postgres://myuser:mypassword@localhost/mywiki_%(nsname)s::%(kind)s

The error I get:

    sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  databas "dbname_default" does not exist         

I even tried to create a new database inside postgresql with the same name of the one in the error log but the problem stays the same.

1

There are 1 best solutions below

0
Michele Trevisan On

Resolved

The problem was the fact that I was trying to create a database in the wrong way: I was using the command line of psql to do all the work, but when I discovered pg_admin everything started to became easier; the only thing that I had to do myself was creating the 3 databases for the wiki (dbname_default, dbname_userprofiles and dbname_users), after that I run the command ./m new-wiki and everything was ready to go.

Without creating the three databases before running the ./m new-wiki command the output will be an error so do it before trying to start your wiki