Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is the file for python. I set mysql up via macports (mysql5 & mysqldb) The problem is that I am unsure if I have the configuration correct before I sync the db. The user name to connect mysql is different than the user with privileges on the db but the password is the same on both the connect & user with privileges. Which user name should go in the file? Port should be left blank, I believe the default is 3306. I hope that's correct? thanks....

DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql' 'NAME': 'jenniwren' # Or path to database file if using sqlite3. 'USER': '' # Not used with sqlite3. 'PASSWORD': '**' # Not used with sqlite3. 'HOST': '/var/run/mysql5/mysqld.sock' # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } }

share|improve this question
up vote 0 down vote accepted

The username should be the MySQL user with rights to the database. When you're logged on as that user, and enter:


into the console, you should see a reference to the database name jenniwren. As root, you can also do:

select Db, User from mysql.db where Db = 'jenniwren';

That will show which user(s) have privileges on that database.

share|improve this answer
Matthew thank you that really helps a lot...... – demet8 Aug 2 '10 at 12:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.