Again, following the documentationon OpenStack Dashboard with Mysql Database

I ran into issues when I directly copy and paste the:

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘dashboarddb’,
‘USER’: ‘nova’,
‘PASSWORD’: ‘mygreatsecret’,
‘HOST’: ‘localhost’,
‘default-character-set’: ‘utf8′,
}
}

into my /opt/osdb/openstack-dashboard/local/local_settings.py

I am getting the error message like:

(.dashboard-venv)root@nova-stack:/opt/osdb/openstack-dashboard# sudo tools/with_venv.sh dashboard/manage.py syncdb
Creating table auth_permission
Creating table auth_group_permissions
Traceback (most recent call last):
File “dashboard/manage.py”, line 11, in
execute_manager(settings)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/management/__init__.py”, line 438, in execute_manager
utility.execute()
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/management/__init__.py”, line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/management/base.py”, line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/management/base.py”, line 220, in execute
output = self.handle(*args, **options)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/management/base.py”, line 351, in handle
return self.handle_noargs(**options)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/management/commands/syncdb.py”, line 95, in handle_noargs
cursor.execute(statement)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/db/backends/util.py”, line 15, in execute
return self.cursor.execute(sql, params)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py”, line 86, in execute
return self.cursor.execute(query, args)
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-x86_64.egg/MySQLdb/cursors.py”, line 174, in execute
File “/opt/osdb/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-x86_64.egg/MySQLdb/connections.py”, line 36, in defaulterrorhandler
_mysql_exceptions.OperationalError: (1142, “ALTER command denied to user ‘nova’@’localhost’ for table ‘auth_group_permissions’”)

At the last line, it looks like the Mysql issue. So, I comment out the USER line from the config and ran the command:

sudo tools/with_venv.sh dashboard/manage.py syncdb

And everything is working as expected…