Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
- [GCC 5.3.1 20160413] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> from distutils.sysconfig import get_python_lib
- >>> print get_python_lib()
- /usr/lib/python2.7/dist-packages
- >>> import mysql.connector
- >>> db = mysql.connector.connect(user='root', password='test123', host='127.0.0.1', database='mydb')
- >>> db
- <mysql.connector.connection.MySQLConnection object at 0x7fd3a80536d0>
- DATABASES = {
- 'default': {
- 'ENGINE': 'mysql.connector.django',
- 'NAME': 'mydb',
- 'USER': 'root',
- 'PASSWORD': 'test123',
- 'HOST': '127.0.0.1',
- 'PORT': '3306'
- }
- }
- django.core.exceptions.ImproperlyConfigured: 'mysql.connector.django'
- isn't an available database backend.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement