0

Hello everybody this is my first post,

I made a website with Django 1.8.9 and Python 3.4.4 on Windows 7. As I was using SQLite3 everything was fine. I needed to change the database to MySQL. I installed MySQL 5.6 and mysqlclient. I changed the database settings and made the migration ->worked.

But when I try to register a new account or logging into the admin (made createsuperuser before) I get this Error: (1146, "Table 'community_db.app_cache' doesn't exist") I restarted the server and restarted command prompt.

What also confuses me is the next row: C:\Python34\lib\site-packages\MySQLdb\connections.py in query, line 280 I was reading that there isn't any MySQLdb for Python 3

Would be nice if there is any help. I already spent such a long time for this website and I tried to solve this problem like allllll the other ones before, but for this one I can't find any help via google/stackover. I don't know what to do

pillow_willow
  • 99
  • 3
  • 11

2 Answers2

1

So here is the answer for all the django (or coding in general) noobs like me.

python manage.py createcachetable

I totally forgot about that and this caused all the trouble with "app_cache doesn't exist". At least in this case... I changed my database to PostgreSQL, but I am sure it also helps with MySQL...

pillow_willow
  • 99
  • 3
  • 11
0

I would assume this was an issue with permissions. As in the web-page connects with a user that doesn't have the proper permissions to create content.

If your tables are InnoDB, you'll get the table doesn't exist message. You need the ib* files in the root of the MySQL datadir (e.g. ibdata1, ib_logfile0 ib_logfile1)

If you don't have these files, you might need to fix permissions by logging directly into your DB

OZI
  • 424
  • 3
  • 8
  • I created the database with my root account and I also use my root account via django to get access to this database, so I guess the permission should be ok unless there is a problem with django. – pillow_willow Mar 02 '16 at 10:37
  • The mentioned files are in my data folder in MySQL. What do I need to change and how should I open them? – pillow_willow Mar 02 '16 at 10:38
  • Ok. Is it possible that MySQL is made to drive people insane? Just a theory or it is just me. After I tried to solve my problem (whitout success) many more appeared. The worst is that I changed my root name (suggested for more security) and after this my password does not work anymore. Is there someone out there who could give a hand to some one, who really tries to learn this stuff?? – pillow_willow Mar 02 '16 at 18:31