0

I'm using django with MySQL on a shared hosting. If I'm going in 'users' or 'groups' in administration panel, I see this message:

"Database error. Your database is not configured correctly. Ensure that the appropriate tables were created, and that the corresponding user is allowed to access them."

MySQL database was created with the hosting panel, all tables were created with syncdb command.

Records can be added to table by admin panel (and PHPMyAdmin), but I can't see contents of the table through the Django admin panel.

  • Django 1.6,
  • Python 2.7.5
  • settings.DEBUG=true

I have an access through 'ssh'.

FastCGI config:

import sys, os
venv = 'venv/bin/activate_this.py'
execfile(venv, dict(__file__=venv))
sys.path.insert(0, "path to project")
sys.path.insert(0, "path to python2.7/")
os.environ['DJANGO_SETTINGS_MODULE'] = "project.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
Imamatory
  • 11
  • 3
  • Maybe your ``settings.DATABASES`` configuration is not good ? ``USER`` and ``PASSWORD``. – Stan Jun 19 '14 at 12:22
  • In this case the command "syncdb" would not work but it works – Imamatory Jun 19 '14 at 12:30
  • Maybe your *apache/www* user serving your Django project can't access to the Database ? What is your wsgi config ? – Stan Jun 19 '14 at 12:48
  • I just put root login/password in `settings.py`. How do i know about apache/www permittions? – Imamatory Jun 19 '14 at 13:08
  • I am pretty sure your hosting service has some documentation about the configuration into their environment. Which one is it by the way? – Stan Jun 19 '14 at 13:14
  • Mchost.ru. they have not very well documentation but not bad support and they are configure my fcgi script – Imamatory Jun 19 '14 at 13:49

1 Answers1

0

However problem appears to be wrong configuration .htaccess. Thanks to hosting support.

Imamatory
  • 11
  • 3