콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
29168 화면

I have 2 user

postgresql users are 1) openerp--->databases are demo 2) arun -----> databases are sample, arun, live

arun@arun-Disktop--iam working using terminal like cd /optopenerp/server --->./openerp-server

i can view sample arun and live in localhost:8069 i can not view demo database and also postgres arun role database i can not view the tables so i try to change the postgres user as openerp how to do that can any one help me!!!!! Advance thanks

아바타
취소
베스트 답변

Hello,

your openERP server has 2 parameters --db_password= and --db_user= to match the correct database user.

If you want two different db-users you must either pass different parameters to your server or run 2 different openERP instances.

At the opposite, if you want to see all the database within the same server, you have to grant access to all the DB to the same user.

You can do this with the following pgsql commands :

  • ALTER DATABASE my_db OWNER TO my_user;
  • GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO my_user;
  • GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO my_user;

I you still have read errors, pass the following bash commands :

for tbl in psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" my_db ; do psql -c "alter table $tbl owner to my_user" my_db ; done

for tbl in psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" my_db ; do psql -c "alter table $tbl owner to my_user" my_db ; done

for tbl in psql -qAt -c "select table_name from information_schema.views where table_schema = 'public';" my_db ; do psql -c "alter table $tbl owner to my_user" my_db ; done

Hint : the complete list of server parameters are well documented. Just type

openerp-server --help

Marc.

PS: Please vote if you find this answer useful

아바타
취소