You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Odoo 10数据库创建报错Access denied,请求技术支持

Troubleshooting Odoo 10 "Access Denied" When Creating Databases

Hey there, let's work through this frustrating access denied issue you're hitting with Odoo 10. I've seen similar problems before, and the root causes usually boil down to misconfigured config files, PostgreSQL permissions, or unexpected parameter overrides. Let's break this down step by step:

1. Fix Your Duplicate [options] Sections in odoo-server.conf

First off, your config file has two separate [options] blocks—this is a big problem because Odoo will parse these sequentially, and later settings can override or conflict with earlier ones, leading to unpredictable behavior (like your db credentials getting overwritten).

Here's a cleaned-up, merged version of your config. Replace your current file with this:

[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = rude
db_password = postgres
logfile = /var/log/odoo/odoo-server.log
addons_path=/home/rudehunk/odoo/projects/la10e/enterprise/addons,/home/rudehunk/odoo/projects/la10e/addons,/home/rudehunk/odoo/projects/la10e/my_addons
xmlrpc_port = 8015

Key fixes here:

  • Single [options] block to avoid conflicts
  • Uncommented admin_passwd (critical for database operations—Odoo needs this to let you create/modify databases)
  • Removed duplicate/commented lines that were cluttering things up

2. Verify PostgreSQL User Permissions

Even if your credentials look right, the rude PostgreSQL user might not have the necessary permissions to create databases. Let's fix that:

  1. Log into PostgreSQL as the superuser (usually postgres):
    sudo su - postgres
    psql
    
  2. Run these commands to ensure the rude user has login and database creation rights:
    -- If the user doesn't exist, create it first
    CREATE USER rude WITH LOGIN PASSWORD 'postgres';
    -- Grant permission to create databases
    ALTER USER rude CREATEDB;
    
  3. Exit psql with \q and return to your regular user.

Also, double-check your pg_hba.conf file (usually in /etc/postgresql/<version>/main/) to make sure local connections use MD5 authentication. Look for a line like this:

host    all             all             127.0.0.1/32            md5

If it says peer or trust, change it to md5, then restart PostgreSQL:

sudo systemctl restart postgresql

3. Stop Unwanted Config File Modifications

You mentioned db_user and db_password keep changing automatically. This is likely because the Odoo process (or another script) has write access to your odoo-server.conf file. Lock it down to read-only to prevent this:

chmod 444 /path/to/your/odoo-server.conf

Make sure you replace /path/to/your/ with the actual path to your config file.

4. Confirm Launch Parameters in LiClipse

When you start Odoo via LiClipse, ensure the parameters you're setting match the fixed config file. If you're specifying db_user and db_password in LiClipse, double-check that they're the same as the ones in the config (and that the PostgreSQL user has the permissions we set earlier).

Also, make sure you're not accidentally overriding admin_passwd in your LiClipse launch settings—this needs to match the value in odoo-server.conf when you try to create a database.

Final Checks

After making these changes:

  1. Restart your Odoo server completely (kill any running processes before launching again via LiClipse)
  2. Navigate to the Odoo database manager (usually at http://localhost:8015/web/database/manager)
  3. Enter your admin_passwd (which is admin in the cleaned config) and try creating a new database again.

This should resolve the access denied error. Let me know if you hit any snags along the way!

内容的提问来源于stack exchange,提问作者Nasir Zawar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 19:48:15