title: OperationalError: unable to open database file
body: <p>Graphite throwing the <strong>unable to open database file</strong>  </p>
  
  <pre><code>tail -f /etc/httpd/logs/error_log 
  </code></pre>
  
  <p>This is the setting.py file configuration</p>
  
  <pre><code>DATABASES = {
    'default': {
      'NAME': '/opt/graphite/webapp/test.db',
      'ENGINE': 'django.db.backends.sqlite3',
      'USER': '',
      'PASSWORD': '',
      'HOST': '',
      'PORT': ''
    }
  }
  </code></pre>
  
  <p>done </p>
  
  <pre><code>python manage.py  syncdb
  </code></pre>
  
  <p>The file exists in the below location</p>
  
  <pre><code>[root@bash  graphite]# ls -l /opt/graphite/webapp/test.db
  -rw-rw-rw- 1 nobody nobody 65536 Nov 11 22:22 /opt/graphite/webapp/test.db
  </code></pre>
  
  <p>it throws below error</p>
  
  <pre><code>[Tue Nov 11 22:24:15 2014] [error]   File "/usr/lib/python2.6/site-packages/django/db/backends/util.py", line 53, in execute
  [Tue Nov 11 22:24:15 2014] [error]     return self.cursor.execute(sql, params)
  [Tue Nov 11 22:24:15 2014] [error]   File "/usr/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py", line 452, in execute
  [Tue Nov 11 22:24:15 2014] [error]     return Database.Cursor.execute(self, query, params)
  [Tue Nov 11 22:24:15 2014] [error] OperationalError: unable to open database file
  </code></pre>