﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5776	Conflict between tutorial and 'Get your database running' section of the 'How to install Django' page	Jeff@…	nobody	"This snippet from the 'Get your database running' section of the 'How to install Django' page specifies a limited set of permissions needed for the database user:

If you plan to use Django’s manage.py syncdb command to automatically create database tables for your models, you’ll need to ensure that Django has permission to create tables in the database you’re using; if you plan to manually create the tables, you can simply grant Django SELECT, INSERT, UPDATE and DELETE permissions. Django does not issue ALTER TABLE statements, and so will not require permission to do so. If you will be using Django’s testing framework with data fixtures, Django will need permission to create a temporary test database.

----

However running through the tutorial caused these errors that were corrected by adding ALTER and INDEX permissions:

prompt:~/development/tutsite XXX$ python2.4 manage.py syncdb
	Creating table auth_message
	Creating table auth_group
	Creating table auth_user
	Traceback (most recent call last):
	  File ""manage.py"", line 11, in ?
	    execute_manager(settings)
	  File ""/opt/local/lib/python2.4/site-packages/django/core/management.py"", line 1672, in execute_manager
	    execute_from_command_line(action_mapping, argv)
	  File ""/opt/local/lib/python2.4/site-packages/django/core/management.py"", line 1571, in execute_from_command_line
	    action_mapping[action](int(options.verbosity), options.interactive)
	  File ""/opt/local/lib/python2.4/site-packages/django/core/management.py"", line 534, in syncdb
	    cursor.execute(statement)
	  File ""/opt/local/lib/python2.4/site-packages/django/db/backends/util.py"", line 12, in execute
	    return self.cursor.execute(sql, params)
	  File ""/opt/local/lib/python2.4/site-packages/MySQLdb/cursors.py"", line 163, in execute
	    self.errorhandler(self, exc, value)
	  File ""/opt/local/lib/python2.4/site-packages/MySQLdb/connections.py"", line 35, in defaulterrorhandler
	    raise errorclass, errorvalue
	_mysql_exceptions.OperationalError: (1142, ""ALTER command denied to user 'django'@'localhost' for table 'auth_message'"")

	------------------------

	prompt:~/development/tutsite XXX$ python2.4 manage.py syncdb
	Creating table auth_permission
	Creating table django_content_type
	Creating table django_session
	Creating table django_site
	Installing index for auth.Permission model
	Failed to install index for auth.Permission model: (1142, ""INDEX command denied to user 'django'@'localhost' for table 	'auth_permission'"")Loading 'initial_data' fixtures...
	No fixtures found."		closed	Documentation	dev		fixed	mysql		Someday/Maybe	1	0	0	0	0	0
