wikijs在启动项目时遇到的问题Database Initialization Error: create table “migrations“

简介: wikijs在启动项目时遇到的问题Database Initialization Error: create table “migrations“

问题

使用PostgreSQL安装wikijs过程中,启动项目运行node server时,会报错如下:

error: Database Initialization Error: create table "migrations" ("id" serial primary key, "name" varchar(255), "batch" integer, "migration_time" timestamptz) - permission denied for schema public


出现该问题,问题基本出在PostgreSQL版本问题上。


PostgreSQL v15或更高版本修改了public schema的默认权限。之前的版本允许everyone在schema public中创建对象,现在只有数据库所有者才可以这样做,除非对用户进行授权。

解决办法

grant all privileges on database my_database to my_database_user;
grant all privileges on all tables in schema public to my_database_user;
grant all privileges on all sequences in schema public to my_database_user;
grant all privileges on all functions in schema public to my_database_user;
GRANT CREATE ON SCHEMA public TO my_database_user;

其中的my_database是创建的数据库名称, my_database_user为需要授权的数据库用户名。

相关文章
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.
|
5月前
|
SQL Oracle 关系型数据库
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database (
77 2
|
3月前
|
XML 开发框架 前端开发
利用代码生成工具Database2Sharp生成ABP VNext框架项目代码
利用代码生成工具Database2Sharp生成ABP VNext框架项目代码
|
5月前
|
Java 数据库连接 mybatis
解决Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: No constructor found
解决Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: No constructor found
247 1
|
3月前
|
SQL 移动开发 Java
“\r\n### Error updating database. ,解决问题的思路在于认真参考给的错误提示,看错误提示,这里我的数据表,没有写primary key 导致的
“\r\n### Error updating database. ,解决问题的思路在于认真参考给的错误提示,看错误提示,这里我的数据表,没有写primary key 导致的
|
5月前
|
人工智能 关系型数据库 数据库
PostgreSQL 常见问题解决方案 - ERROR: database is being accessed by other users
PostgreSQL 常见问题解决方案 - ERROR: database is being accessed by other users
|
5月前
|
SQL 数据库
导入 sql 文件,如果发生 ERROR 1046 (3D000) no database selected 错误
导入 sql 文件,如果发生 ERROR 1046 (3D000) no database selected 错误
76 0
|
5月前
|
XML Java 数据库
SpringBoot【问题 03】BindingException\MalformedInputException\Error querying database(sqlite数据库)
SpringBoot【问题 03】BindingException\MalformedInputException\Error querying database(sqlite数据库)
130 0
|
Java 数据库连接 数据库
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.问题的解决
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.问题的解决
183 0
|
关系型数据库 MySQL 数据库
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
1067 0

热门文章

最新文章

下一篇
无影云桌面