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

  • SEARCH
  • Home
  • 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 7530635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:57:53+00:00 2026-05-30T04:57:53+00:00

I was trying to access the mysql databases from server A to server apple

  • 0

I was trying to access the mysql databases from server A to server “apple” using the Python Django. The relevant statements are

import settings
os.environ['DJANGO_SETTINGS_MODULE'] = runconfig.django_settings_module
from django.db import connection

class Writer(object):
  def __init__(self):

  def submission(self,pars):
    d = connection.cursor()

and running this gives me the error as below:

_mysql_exceptions.OperationalError: (1044, "Access denied for user 'username'@'ice.cse.connell.edu' to database 'mydatabase'")

The content of runconfig.py is

# Django setting module 
django_settings_module = 'settings'

Strangely, I am able to login to mysql from server “ice” to server “apple” remotely:

$ mysql -u username -ppassword -h apple

I have been digging this problem from SO but still cannot find an answer. This question has been driven me crazy!

Below is the first few lines of my settings.py. Because it is too long, I did not post all of it. But if any one needs more, I can paste all the content.

# Django settings for mydatabase project.

DEBUG = False
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = 'mysql'          # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'mydatabase'  # Or path to database file if using sqlite3.
DATABASE_USER = 'username'             # Not used with sqlite3.
DATABASE_PASSWORD = 'password'         # Not used with sqlite3.
DATABASE_HOST = 'apple'            # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

—————————————————————————————–

APPENDED POST

After modifying the settings.py based on Sid’s suggestion:

#DATABASE_ENGINE = 'mysql'           
#DATABASE_NAME = 'mydatabase'   
#DATABASE_USER = 'username'             
#DATABASE_PASSWORD = 'password'         
#DATABASE_HOST = 'apple'  
#DATABASE_PORT = ''     

DATABASES = {
  'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'mydatabase',
    'USER': 'username',
    'PASSWORD': 'password',
    'HOST': 'apple',
    'PORT': '',
  }
}

The command line inputs and error messages are

>>> import runconfig
>>> 
>>> import os
>>> import sys
>>> import settings
>>> #from django.conf import settings
... 
>>> os.environ['DJANGO_SETTINGS_MODULE'] = runconfig.django_settings_module
>>> 
>>> from django.db import connection
>>> c = connection.cursor()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/site-packages/django/db/backends/dummy/base.py", line 15, in complain
    raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE setting yet."
django.core.exceptions.ImproperlyConfigured: You haven't set the DATABASE_ENGINE setting yet.
  • 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-30T04:57:54+00:00Added an answer on May 30, 2026 at 4:57 am

    Check your database name, it may be case-sensitive.

    http://groups.google.com/group/django-users/browse_thread/thread/8717661c908b836e

    Try Using the following format:

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql', 
            'NAME': 'mydatabase', 
            'USER': 'username',     
            'PASSWORD': 'password', 
            'HOST': 'apple',
            'PORT': '',     
        }
     }
    

    Also, does the username you are using have privileges to this database?

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

Sidebar

Related Questions

I am trying to import an access database to mysql. I have created a
I'm trying to connect to a mysql server at dreamhost from a php scrip
I'm trying to import an 82k+ row table from an access db to SQL
I am trying to insert rows into a MySQL database from an Access database
I am trying to access mysql on dreamhost via a mac terminal. From the
I am having a few issues when people are trying to access a MySQL
I am trying to convert an access datetime field to a mysdl format, using
Im trying to access a web service from a remote computer. I managed to
I am trying to access Outlook 2007 from C#. I have installed the PIA
So, I've had some issues while trying to come over from Latin1 encoded databases,

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.