Tutorial Part 5 should warn about possible db errors when running your first test
When you run your first test as instructed in https://docs.djangoproject.com/en/1.9/intro/tutorial05/#running-tests you may run into an error something like Got an error creating the test database: (1044, "Access denied for user 'user'@'host' to database 'test_db_name'")
. For a reader not paying close attention, it is easy to miss that django is attempting to create an entirely new database, and the tutorial doesn't mention it. If you had set up a mysql database and user with privileges just for your django database, then you will see this error. It would be good if the tutorial mentioned that django will create a new test database and that if django's mysql connection doesn't have permission to create a new database, you'll need to create one for it and grant the necessary priviledges.
Change History
(10)
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Uncategorized → Cleanup/optimization
|
Owner: |
changed from nobody to Bob McDonald
|
Status: |
new → assigned
|
Patch needs improvement: |
set
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
I think I'd rather put the advice in tutorial 2 "Database setup". Since most new users probably use SQLite, it would be nice to avoid another special call out for others where we already have one in tutorial 2 (also it's likely easier to do all your database configuration once). Feel free to submit a patch if you can.