Forums

mySQL database setu

I'm bran new to python anywhere and honestly I'm new to databases. I'm Using django with python 2.7.9. in my settings.py file I have

import mySQLdb DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': '<username>$<mysql_name>', 'USER': '<username>', 'PASSWORD': '<sql_password>', 'HOST': 'mysql.server', } }

and i ran $ pip install mysql-python and it was successful

now after running $ python manage.py migrate I still get a database improperly configured error.

I probably need a step by step instruction for this.

What's the exact error you're getting? Normally it tells you which bit it's confused by.

Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/core/management/init.py", line 338, in execute_from_command_line utility.execute() File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/core/management/init.py", line 330, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv self.execute(args, cmd_options) File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute output = self.handle(args, **options) File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 93, in handle executor = MigrationExecutor(connection, self.migration_progress_callback) File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 19, in init self.loader = MigrationLoader(self.connection) File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 47, in init self.build_graph() File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 180, in build_graph self.applied_migrations = recorder.applied_migrations() File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations self.ensure_schema() File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()): File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 164, in cursor cursor = self.make_cursor(self._cursor()) File "/home/ianmann56/.virtualenvs/django_girls/local/lib/python2.7/site-packages/django/db/backends/dummy/base.py", line 21, in complain raise ImproperlyConfigured("settings.DATABASES is improperly configured. " django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

more specifically:

raise ImproperlyConfigured("settings.DATABASES is improperly configured. "

django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

never mind. I figured it out. I had some settings for sqlite3 in my settings file so it was getting confused