Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

error create database openerp 7

By
jay
on 6/9/14, 1:57 AM 4,355 views

I used ubuntu 14.04 and try installed Openerp 7. I used this tutorial

http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/comment-page-2/

 

success but when I tried create database...error

 

Client Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 774, in create params['create_admin_pwd']) File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info) Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 122, in dispatch return fn(*params) File "/opt/openerp/server/openerp/service/web_services.py", line 167, in exp_create_database self._create_empty_database(db_name) File "/opt/openerp/server/openerp/service/web_services.py", line 136, in _create_empty_database cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "%s" """ % (name, chosen_template)) File "/opt/openerp/server/openerp/sql_db.py", line 161, in wrapper return f(self, *args, **kwargs) File "/opt/openerp/server/openerp/sql_db.py", line 226, in execute res = self._obj.execute(query, params) ProgrammingError: permission denied to create database

please help me...

 

thank you

how change access rights ?

jay
on 6/9/14, 3:51 AM
0

This error happens mostly when using OpenVZ OS templates. Try this:

su postgres
psql

UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
\q
exit

-1

There may be 2 reasons.

1) You might have given wrong super admin password.

2) There is no rights to 'openerp' user to create database. For this you need to make change in pg_hba.conf file for postgresql database. This file you can find over here.  ( If you are using Ubuntu )

/etc/postgresql/9.1/main/pg_hba.conf

Remember : You need to restart database server after done any change in that file. 

Hope this helps,

if i need to change in the pg_hba.conf file what is need to be change there can u refer me the code mr.Hiren

katty
on 11/20/14, 6:27 AM
-1
test webap
On 8/31/14, 1:49 AM

In terminal the following commands fixed the issue for me, try it once

sudo su postgres

psql

ALTER ROLE openerp CREATEROLE CREATEDB;

 

-1
Mariusz Mizgier
On 6/9/14, 3:16 AM

As stated in log your user has no access rights at PostgreSQL to create database - change his access rights and you will be ready to go.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/9/14, 1:57 AM
Seen: 4355 times
Last updated: 3/16/15, 8:10 AM