I am trying to install graphite in ubuntu box, I am running on Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-43-generic x86_64) These are the setting in my local_settings.py file for the database
DATABASES = {
'default': {
'NAME': 'graphite.db',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'USER': 'graphite',
'PASSWORD': '\*\*\*\*\*',
'HOST': '127.0.0.1',
'PORT': '5432'
}
}
Getting the following error while executing sudo graphite-manage migrate auth
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/usr/lib/python3/dist-packages/django/utils/asyncio.py", line 33, in inner
return func(\*args, \*\*kwargs)
File "/usr/lib/python3/dist-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/lib/python3/dist-packages/django/utils/asyncio.py", line 33, in inner
return func(\*args, \*\*kwargs)
File "/usr/lib/python3/dist-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
connection = Database.connect(\*\*conn_params)
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 122, in connect
conn = \_connect(dsn, connection_factory=connection_factory, \*\*kwasync)
psycopg2.OperationalError: connection to server at "127.0.0.1", port 5432 failed: FATAL: database "graphite.db" does not exist
I assure that the graphite user has been created and enough permissions has been given. tried with different engine like django.db.backends.postgresql, but still facing the same issue
graphite.dbdoes not exist because it hasn't been created, you might have to create the database manually and set priviledges before runningsudo graphite-manage migrate auth