lundi 20 juillet 2020

MySQL user privileges for testing Django app

I am using MySQL with Django. Are my only choices for allowing testing the following? I don't want to keepdb.

  1. GRANT ALL ON *.* to '<user>'@'localhost' so that the user can create test databases, etc.

  2. Test on sqlite which is almost the same thing but isn't MySQL and important if I am testing for everything.

Option 1 seems a little unsafe and Option 2 still leaves the door open for untested areas.

Is there another option in terms of the privileges I can grant or ways to think about it?

What is the Django/python recommended way to do it? Option 1 is what my search has yielded so far.

Aucun commentaire:

Enregistrer un commentaire