When I have create a DB using PGAdmin it creates the db under administrator as the user. then again I created a DB using Openerp frontend it creates the db under openerp as the user.
I only need one user wich both parties can access. How to do so ? when ever I tried to connect as openerp it asks for password which I didn't have. Please help me with this
You can check the configuration file of your Odoo, and inside it you will see a parameter named db_user (it will have openerp as its value). Its password will be set in db_password parameter. There you can know the password of the user openerp or even you will be able to modify both user and password to whatever you want.
Related
I created a database using pqsl in the command line of my Mac with tables and users. Yet, when I connect to my psql database using pgAdmin4 it doesn't show my database?
Registered a server with name localhost.
Set the username to match the name of a user in the database I create using the command line.
Host name set to localhost.
Maintenance Database was set to the name of my database.
Set role to the same name as the user.
Tap Save.
Then under databases I don't find the name of my database at all, just api with none of my created tables??
Thanks for any help!
I imported a postgres database in my local postgres server.
I had to connect to the database (to allows django to retrive data) using the file called setup.local.
There is required to specify: DB_HOST=localhost, DB_NAME, DB_USER, DB_PASSWORD.
DB_HOST is localhost without any doubt. The DB_name is the one I choose importing (psql imported_db < downloaded_DB)
DB_USER is my_name (or I can change the owner ALTER DATABASE imported_db OWNER TO other_name).
The wire thing, for me, is that I have to use the user (either the my_name or other_name) password and not the database password (even if the variable name is DB_PASSWORD).
So the question:
does a psql database have a password or just the roles/users have ones and use them to access the database?
Andrea
Passwords are set for USER and ROLE only. A user may access multiple databases, according to the GRANTs for the ROLE.
See also:
https://www.postgresql.org/docs/10/static/ddl-priv.html
https://www.postgresql.org/docs/10/static/client-authentication.html
https://www.postgresql.org/docs/10/static/user-manag.html
DB_HOST=localhost is a key here. Look into the pg_hba.conf you will find ident against localhost connections most probably.
https://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-IDENT
When ident is specified for a local (non-TCP/IP) connection, peer
authentication (see Section 20.3.6) will be used instead.
https://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-PEER
The peer authentication method works by obtaining the client's
operating system user name from the kernel and using it as the allowed
database user name (with optional user name mapping). This method is
only supported on local connections.
I'm new to postgresql database. I followed instruction online and get my postgreSQL database installed and everything works fine. with psql, I created new user user1 as below:
CREATE USER user1 WITH PASSWORD '123';
Now I have a user called 'user1', in addition to default user 'postgres'.
I'm very confused with what those user can do. I'm not sure what is the use of creating the new user.
My questions are:
Can I log into the database as user1? How?
Can the user see all the database in the system, no matter what the database owner is? In my case, all the database I created is owned by 'postgres'.
Am I able to make the user see only some of the databases?
When I try to access my Odoo 8 application I am redirected to Database Management menu and page "Create a New Database". However, there is a database in the system, I can see it through pgAdmin fine, and it worked all the time until now. As far as I know I have not changed anything.
How I can make Odoo 8 connecting to already present database again as it did before?
Thanks for your help!
You should also check the ownership of the database. If you restore it from psql, make sure you set the owner to your openerp user.
ALTER DATABASE your_db OWNER TO your_openerp_user
DB user & password are either specified from the CLI, i.e.
openerp-server --db_user=openerp --db_password=openerp
or they are specified in the configuration file usually located in :
/etc/openerp/openerp-server.conf
For that we must enter the administrator OpenERP database, one of the facilities provided to us in that menu is to restore the database from a backup, another option is to create a new database. A look created the database on the homepage of OpenERP can select the database with which we work and then insert the username and password.
What I did is I have backed up main database then restored it to a new database called TestA. When I opened Odoo web site, it picked up TestA database. Then I clicked on "Back to Login" option at the top right corner of the page and after that I was offered to chose between the two databases during login. I selected the main one and Odoo loaded successfully.
I had this same issue. I kept getting redirected to the login page even though the database was already created. What I did was change the admin password in the database using pgAdmin. At the page where the database creation is on there is a login option.
It's under the res_user table I just did this. After that I logged in I wasn't prompted with the database again.
Update res_user
Set password = 'your_password'
Where login = 'admin'
I am using win Vista, and I am trying to backup some Database under DB2.
I am logged in using the Administrator user, and whenever I try to issue the backup command in the "command line processor", I get the following message:
SQL1092N "ADMINISTRATOR" does not have the authority to perform the requested command. SQLSTATE=00000
BTW, I have created a username/password pair (db2admin) while installing the DB2 server.
So, Will this problem will be get solved if I use the db2admin user? And how to connect to the server (local server BTW) using the db2admin user ?
I had this problem recently and this seemed to do the job:
Attach to your [local] node. (the value of your DB2INSTANCE environ variable, mine was 'DB2'):
attach to DB2 user db2admin using mypassword;
If this isn't enough (it didn't seem to be with me), you can also specify the user and password with backup and restore commands:
restore database mydbname user db2admin using mypassword from C:\BACKUPS taken at 20100823132457;
Or manually create the db2admin user with a password on Windows. But I'm not sure if that's the correct option here.