[英]Configuring moin2 to use postgresql as the Wiki Engine
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.我正在尝试在文件 wikiconfig.py 上设置 Wiki Engine 配置,以便能够使用 postgresql 而不是默认文件系统(fs 存储),但我无法使其工作,我已经完成了所有导入(flask_sqlalchemy 和sqlalchemy),编辑了指南中写的 URI https://buildmedia.readthedocs.org/media/pdf/moin-20/latest/moin-20.pdf并更改了我要使用的数据库的名称,名称和所选用户的密码,但每次我启动服务器并尝试登录平台时,都会出现内部服务器错误。 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.我什至尝试在 postgresql 中创建一个与错误日志中的名称相同的新数据库,但问题仍然存在。
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;问题是我试图以错误的方式创建数据库:我使用 psql 的命令行来完成所有工作,但是当我发现 pg_admin 时,一切都开始变得更容易了; 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.我自己唯一需要做的就是为 wiki 创建 3 个数据库(dbname_default、dbname_userprofiles 和 dbname_users),然后我运行命令
./m new-wiki
,一切都准备好了 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在运行
./m new-wiki
命令之前不创建三个数据库,output 将是一个错误,所以在尝试启动您的 wiki 之前执行此操作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.