Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 986095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:15:56+00:00 2026-05-16T05:15:56+00:00

This is the settings.py file for python. I set mysql up via macports (mysql5

  • 0

This is the settings.py file for python. I set mysql up via macports (mysql5 & mysqldb) The problem is that I am unsure if I have settings.py configuration correct before I sync the db. Should the PORT be left blank? I believe it should. I know on my Mamp install I have it set to 3306. 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.
    }
}

update: this is what I am getting when I test the db in the shell..

demetrius-fords-macbook-pro-17:jenniwren demet8$ python manage.py dbshell
Traceback (most recent call last):
File “manage.py”, line 4, in
import settings # Assumed to be in the same directory.
File “/Users/demet8/python_projects/jenniwren/settings.py”, line 15
‘NAME’: ‘jenniwren’ # Or path to database file if using sqlite3.
^
SyntaxError: invalid syntax

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:15:56+00:00Added an answer on May 16, 2026 at 5:15 am

    3306 is the default, so that should be fine.

    Why do you have the host set to that? I haven’t used MySQL on a Mac, but on Linux the host is ‘localhost’.

    The ‘invalid syntax’ is because you do’t have a comma after the host string – wait, after any of the strings but the last one – and that is invalid syntax for Python dictionary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Weired problem! ASP.NET Session expires instantly. In my web.config I have this session settings:
I have this bash script on the server that runs every hour, via cron.
I have set all of my PHP settings in the php.ini file to allow
I have a modal settings dialog which is a JDialog. In this settings window
I have a WordPress plugin with settings page. On this settings page, the form
I have this code for the settings: Dim settings As XmlWriterSettings = New XmlWriterSettings()
I have this code: int se = (int) settings.GruppoSegreteria; var acc = db.USR_Accounts.Where( p
In settings.py I have setup a way to log my messages like this: logging.basicConfig(
I am having a problem installing the Python MySQL connector (MySQL-python-1.2.3c1) on my Mac
I set django's settings.py file to chmod 600 to keep felonious folks from spying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.