{ 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'read_default_file': os.path.join(BASE_DIR, ‘tsans/mysql/my.cf’), }, } } .... tsans/settings.py [client] database = mydb user = mydb_user password = pass4mydb default-character-set = utf8 tsans/mysql/my.cf