Advertisement
Guest User

Untitled

a guest
Jun 15th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
  2. [GCC 5.3.1 20160413] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> from distutils.sysconfig import get_python_lib
  5. >>> print get_python_lib()
  6. /usr/lib/python2.7/dist-packages
  7. >>> import mysql.connector
  8. >>> db = mysql.connector.connect(user='root', password='test123', host='127.0.0.1', database='mydb')
  9. >>> db
  10. <mysql.connector.connection.MySQLConnection object at 0x7fd3a80536d0>
  11.  
  12. DATABASES = {
  13. 'default': {
  14. 'ENGINE': 'mysql.connector.django',
  15. 'NAME': 'mydb',
  16. 'USER': 'root',
  17. 'PASSWORD': 'test123',
  18. 'HOST': '127.0.0.1',
  19. 'PORT': '3306'
  20. }
  21. }
  22.  
  23. django.core.exceptions.ImproperlyConfigured: 'mysql.connector.django'
  24. isn't an available database backend.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement