简体   繁体   English

配置 moin2 以使用 postgresql 作为 Wiki 引擎

[英]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.

相关问题 使用包含“:”的用户配置 sqlalchemy 引擎 - Configuring sqlalchemy engine with user containing “:” 如何使用 SQLAlchemy 引擎一次执行多个 postgreSQL 语句? - How to use SQLAlchemy engine to execute multiple postgreSQL statements at once? to_sql + sqlalchemy + 从 + postgresql 引擎复制? - to_sql + sqlalchemy + copy from + postgresql engine? 如何在PostgreSQL数组字段上使用ilike sqlalchemy? - How to use ilike sqlalchemy on postgresql array field? 用于访问 PostgreSQL 数据库的“sqlalchemy.engine.URL.create”的有效“查询”键是什么? - What are the valid `query` keys for `sqlalchemy.engine.URL.create` that work for accessing a PostgreSQL database? 使用装饰器在SQLAlchemy中创建引擎 - Use decorator to create engine in SQLAlchemy 将 SQLAlchemy 与引擎/连接而不是会话一起使用是否是线程安全的? - Is it thread-safe to use SQLAlchemy with engine/connections instead of sessions? 我如何使用create_engine在sqlalchemy中使用数据库? - How would I use database in sqlalchemy using create_engine? 如何动态创建 SQLAlchemy 引擎并在 Flask 中的请求之间使用它? - How to dynamically create a SQLAlchemy engine and use it between requests in Flask? 如何在 SQLAlchemy(特别是 Flask-SQLAlchemy)中使用 PostgreSQL 扩展? - How to use PostgreSQL extensions in SQLAlchemy (specifically Flask-SQLAlchemy)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM