Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
11 Trả lời
71915 Lượt xem

Hello All,

I got an error while creating a DB, the error given below. 

ProgrammingError: permission denied to create database

can anyone hel me Thanks.

Ảnh đại diện
Huỷ bỏ

It will be very hard to tell what happened unless you give a lot more details. Which environment was used, which odoo, how was it installed.... etc. etc.

HI do you got solution for this problem?. I am getting same error, can you please help me?

you have the uncomment the admin password in your config file.

Câu trả lời hay nhất

You should do following steps:

1.  ssh to your server where odoo is installed 

2. sudo su  postgres    (the idea is to switch to postgresql user)

3. psql

4. ALTER USER odoo WITH CREATEDB;

5. Go back to web page and try create db once again

Ảnh đại diện
Huỷ bỏ

This error occur when you are try to create a DB from a user that connect Postgres that user's role is not set to be privilege, that has the right to create DB.

solution:

1. set the user that trying to connect to be superuser

psql > Alter user YOURUSER with SUPERUSER;

2. User PgAdmin to set privilege

file:///home/minhtech/Pictures/guiOdoo.png

Câu trả lời hay nhất

permission also. Give your postgres user permission to create database

1 sudo su  postgres

2 psql

3 ALTER USER odoo WITH CREATEDB;

4 \q

5 logout

6 restart server

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Please try using Master Password: admin

Ảnh đại diện
Huỷ bỏ

I am trying with the master password admin, getting same error. Can you please help me?

Câu trả lời hay nhất

You will need to create a postgres user: by default the only user is postgres, and Odoo forbids connecting as postgres. 

on Linux, use your distribution's package, then create a postgres user named like your login

Because postgres only allow the login if you have the same distribution user. 

check the user permission also. Give your postgres user permission to create database with ALTER. 

To do this 

sudo -i -u postgres
psql
create user your_user_name;
alter role your_user_name with superuser createdb;
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Please check your log file and post it here.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Your postgresql user that you're running Odoo with doesn't have database creation permission.

ALTER USER odoo_db_user WITH option CREATEDB;
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Not at a Current Master password, please try to admin as default password..

To change master password, edit

/etc/openerp/openerp-server.conf

Set value for

admin_passwd


root@dev1:~# cat /etc/openerp/openerp-server.conf
[options]
; This is the password that allows database operations:
admin_passwd = oQoADDDLbw124
db_host = False
db_port = False
db_user = openerp
db_password = False
root@dev1:~# 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 19
18706
1
thg 3 15
3631
2
thg 12 24
3104
0
thg 2 23
3126
0
thg 10 20
2119